const w3cAnno1 = {
id: Date.now(), // Unique ID for the first annotation
type: "Annotation",
target: {
selector: {
conformsTo: "http://www.w3.org/TR/media-frags/",
type: "SvgSelector",
value: `<svg><polygon points='100,360 423,360 432,932 100,932 100,360'></polygon></svg>`,
},
},
};
here, I can save only one polygon on osd if i use addAnnotation , what if I want to save two distinct separate polygons on osd at once?
I tried defining w3cAnno2 like:
const w3cAnno2 = {
id: Date.now(), // Unique ID for the second annotation
type: "Annotation",
target: {
selector: {
conformsTo: "http://www.w3.org/TR/media-frags/",
type: "SvgSelector",
value: `<svg><polygon points='500,360 923,360 932,932 500,932 500,360'></polygon></svg>`, // Example points for the second polygon
},
},
};
Lets say I hace defined one w3cAnno1 like this:
here, I can save only one polygon on osd if i use
addAnnotation
, what if I want to save two distinct separate polygons on osd at once? I tried definingw3cAnno2
like:then tried to save both of them:
but this doesnt work.... anyone have possible solution?