Skip to content

Enable enlarge image in ImageInnotater #39

@satosisotas

Description

@satosisotas

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;
				}
			}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions