Thank you for continuing to improve marker.js! ⭐
I just migrated from v2 to v3 but ran into a missing feature from v2: defaultColorsFollowCurrentColors ailon/markerjs2#21,
which enables the user to preserve last selected color when switching markers.
The AnnotationEditorSettings mostly cover rendererSettings but no preserve selected color option.
https://markerjs.com/docs-v3/interfaces/marker.js_ui.annotationeditorsettings
|
export interface AnnotationEditorSettings { |
|
/** |
|
* Whether the rasterized image should be rendered on save. |
|
* If set to false the `editorsave` event will not contain the `dataUrl` property. |
|
*/ |
|
renderOnSave?: boolean; |
|
/** |
|
* Configuration for the image renderer. |
|
* This is used to configure the image rendering settings. |
|
*/ |
|
rendererSettings: { |
|
/** |
|
* Whether the image should be rendered at the original (natural) target image size. |
|
*/ |
|
naturalSize?: boolean; |
|
/** |
|
* Rendered image type (`image/png`, `image/jpeg`, etc.). |
|
*/ |
|
imageType?: string; |
|
/** |
|
* For formats that support it, specifies rendering quality. |
|
* |
|
* In the case of `image/jpeg` you can specify a value between 0 and 1 (lowest to highest quality). |
|
* |
|
* @type {number} - image rendering quality (0..1) |
|
*/ |
|
imageQuality?: number; |
|
/** |
|
* When set to true, only the marker layer without the original image will be rendered. |
|
*/ |
|
markersOnly?: boolean; |
|
|
|
/** |
|
* When set and `naturalSize` is `false` sets the width of the rendered image. |
|
* |
|
* Both `width` and `height` have to be set for this to take effect. |
|
*/ |
|
width?: number; |
|
/** |
|
* When set and `naturalSize` is `false` sets the height of the rendered image. |
|
* |
|
* Both `width` and `height` have to be set for this to take effect. |
|
*/ |
|
height?: number; |
|
}; |
|
} |
Thank you for continuing to improve marker.js! ⭐
I just migrated from v2 to v3 but ran into a missing feature from v2:
defaultColorsFollowCurrentColorsailon/markerjs2#21,which enables the user to preserve last selected color when switching markers.
The
AnnotationEditorSettingsmostly coverrendererSettingsbut no preserve selected color option.https://markerjs.com/docs-v3/interfaces/marker.js_ui.annotationeditorsettings
markerjs-ui/src/lib/AnnotationEditor.ts
Lines 45 to 90 in b619da3