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

Input field not selectable on canvas resize #23

Open
iris-winter opened this issue May 13, 2016 · 0 comments
Open

Input field not selectable on canvas resize #23

iris-winter opened this issue May 13, 2016 · 0 comments

Comments

@iris-winter
Copy link

iris-winter commented May 13, 2016

When resizing the input scaled correctly but the "select" box to focus stays relative to the original canvas width.

Something like this fixes it . 1359 - 1362

 var self = this,
        relativeX = self._ctx.canvas ? self._x / ( self._ctx.canvas.width / self._ctx.canvas.offsetWidth) : self._x,
        relativeY = self._ctx.canvas ? self._y / ( self._ctx.canvas.height / self._ctx.canvas.offsetHeight) : self._y,
        xLeft = x >= relativeX + self._extraX,
        xRight = x <= relativeX + self._extraX + self._width + self._padding * 2,
        yTop = y >= relativeY + self._extraY,
        yBottom = y <= relativeY + self._extraY + self._height + self._padding * 2;
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