ProjectMirador / mirador-annotations

a Mirador 3 plugin that adds annotation creation tools to the user interface
https://mirador-annotations.netlify.app/
38 stars 37 forks source link

How to change the default thickness of the annotation while drawing new annotation on the image #76

Open ChickbanurKumar opened 1 year ago

ChickbanurKumar commented 1 year ago

Currently if the thickness is selected and draw annotation then it works. but want to change default thickness because it is very thin. Below attached image having circle and rectangle annotation with default thickness(marked Screenshot from 2023-04-25 17-15-38 )

Below is my code:

import PathologyViewingApp from './plugins/PathologyViewingApp'; import PathologyReport from './plugins/PathologyReport'; import miradorAnnotationPlugins from 'mirador-annotations'; import AnnototAdapter from 'mirador-annotations/es/AnnototAdapter';

    <Router>
      <Mirador
        config={{
          annotation: {
            adapter: (canvasId) =>
              new AnnototAdapter(
                canvasId,
                `${base_ehr_crud_url}/pathds/api/v1/annotation/annotot`
              ),
            exportLocalStorageAnnotations: false,
          },
          id: 'mirador',
          osdConfig: {
            crossOriginPolicy: 'use-credentials',
            timeout: 100000,
          },
        }}
        plugins={[
          PathologyReport,
          PathologyViewingApp,
          ...miradorAnnotationPlugins,
        ]}
      />
    </Router>

useEffect(() => { mirador.viewer( { ...config, windows: [{ loadedManifest: json && json.loaded_manifest }], window: { allowClose: false, defaultSideBarPanel: 'annotations' }, }, [...plugins] ); }, [config, json, plugins]);