djaodjin-annotate icon indicating copy to clipboard operation
djaodjin-annotate copied to clipboard

Canvas Ignore Width and Height

Open khaukheng opened this issue 5 years ago • 4 comments

I have set the options as follow

options = { width: "600", // Width of canvas height: "500", // Height of canvas color:"red", // Color for shape and text type : "rectangle", // default shape: can be "rectangle", "arrow" or "text" images: ['/assets/images/mockImage.jpg'], linewidth:2, // Line width for rectangle and arrow shapes fontsize:"20px", // font size for text bootstrap: true, // Bootstrap theme design position: "top", // Position of toolbar (available only with bootstrap) idAttribute: "id", // Attribute to select image id. selectEvent: "change", // listened event to select image unselectTool: false, // display an unselect tool for mobile onExport: (image)=>{this.export(image)} };

but the library just ignore my width and height and it will resize based on the image i put and it even goes beyond my screen when my picture is 1920*1080. Any help is much appreciated. Even the demo folder in this github does the same thing.

image

khaukheng avatar Oct 07 '18 09:10 khaukheng