Skip to content
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

Enable enlarge image in ImageInnotater #39

Open
satosisotas opened this issue Feb 6, 2022 · 0 comments
Open

Enable enlarge image in ImageInnotater #39

satosisotas opened this issue Feb 6, 2022 · 0 comments

Comments

@satosisotas
Copy link

Currently the width and height property in the ImageInnotation subclass are effective only if the canvas size is smaller than source image.
I would like to enlarge source image if there are no problems.

In imagewidget.js

			if (wantwidth !== undefined && wantwidth > 0) {
				self.usewidth = wantwidth;
				self.canvas.setAttribute('width', wantwidth.toString());

                                // Disabling zoom if canvas width is larger than source image width.
                                // Therefore only shrinking is possible.
				if (wantwidth > self.imgel.width) {
					self.usewidth = self.imgel.width;
					self.zoom = 1.0;
				}
				else {
					self.usewidth = wantwidth;
					self.zoom = wantwidth / self.imgel.width;
				}
			}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant