bbox/polygon durch selections ersetzen
- bbox und polygon Felder in Directus versteckt (Daten bleiben) - Alle Auswahlen laufen nur noch über das selections-Feld - CanvasObject, DirectusObject, API und Zeichenlogik umgestellt - Objekte mit mehreren Auswahlen werden korrekt auf Canvas gezeichnet Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,7 @@ export function directusAssetUrl(mediaId: string, token: string): string {
|
||||
return `${DIRECTUS_URL}/assets/${mediaId}?access_token=${token}`
|
||||
}
|
||||
|
||||
import type { DirectusObject, BBox, Point } from './types'
|
||||
import type { DirectusObject, Selection } from './types'
|
||||
|
||||
export async function getDirectusObjects(pictureId: string, token: string): Promise<DirectusObject[]> {
|
||||
const res = await fetch(`/api/directus/objects?picture_id=${pictureId}`, {
|
||||
@@ -45,9 +45,7 @@ export async function getDirectusObjects(pictureId: string, token: string): Prom
|
||||
|
||||
export async function createDirectusObject(payload: {
|
||||
picture: string
|
||||
bbox: BBox | null
|
||||
polygon: Point[] | null
|
||||
selections: import('./types').Selection[] | null
|
||||
selections: Selection[] | null
|
||||
user_notes: string | null
|
||||
parent: string | null
|
||||
}, token: string): Promise<DirectusObject> {
|
||||
|
||||
Reference in New Issue
Block a user