Open jetic83 opened 7 years ago
good catch, there is no default scale options, I'll add it.
meanwhile you can initialize with e.g. viewer.fabricjsOverlay({scale: 1000});
Cool, thanks! It is also not clear to me what the scale means. Maybe a short description in the readme would be helpful.
it's an arbitrary size for fabric canvas, similar (and corresponding to) OpenSeadragon viewport coordinates. For example, if you have one image loaded, by default viewport x coordinates of OpenSeadragon go from 0 to 1 (see Viewport Coordinates example) and if you have scale 1000 in this plugin, then fabric objects will have corresponding coordinates from 0 to 1000, so fabric x=1000 is right side of the image or Viewport coordinate x=1. If you need to have fabric coordinates tied to image pixel size, you can set scale to image width.
Using it as described in the readme ( viewer.fabricCanvas() ) throws an exception:
Unable to get property 'scale' of undefined or null reference
Is there a default for options.scale ?