-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Canvas Ignore Width and Height #62
Comments
any update on this? |
No. My current 'hack' is to resize the image with another library first before putting into djaodjin-annotate. |
In Js file modify the if condition inside setBackgroundImage function as following . if ((self.options.width && self.options.height) !== undefined && It worked for me |
Thanks for your solution, it is working when self.options.width and self.options.height is specified, but cannot annotate if self.options.height or self.options.width is not specified in the options. if ((self.options.width && self.options.height) !== undefined && |
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.
The text was updated successfully, but these errors were encountered: