-
-
Notifications
You must be signed in to change notification settings - Fork 228
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 initiation with constraints #29
Comments
You have an error in your solution: |
This fix (last arg corrected to |
fixed with version 1.0.23. the width/height in the constructor is propagated as CSS attribute to the named DIV |
Dears.
this issue is related to issue #7 opened by me previously.
problem is: in cases when canvas is instantiated by calling
canvas = new draw2d.Canvas("canvas", 4000, 4000) - without directly mentioning css {width: 4000px; height: 4000px}
in container;will cause figures not be able to be moved outside initial area (viewport) of the container.
this behaviour is caused by line 121 of Canvas.js:
where
this.getWidth()
andthis.getHeight()
will return initial viewport dimensions.change this to:
will do proper job, if you agree.
thanks
Alex
The text was updated successfully, but these errors were encountered: