We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
选区可以随意拖动,甚至可以拖动到图片外面。并没有限制只能在图片大小的范围的进行拖动。希望能修复。
The text was updated successfully, but these errors were encountered:
@PENG199 master的代码可以用,npm没有更新,不过master的代码需要改一下。 alloy-crop.js文件中
pressMove: function (evt) { var cr = self.img.getBoundingClientRect(); var boxOffY = (document.documentElement.clientHeight - self.height)/2; if((boxOffY - cr.top - evt.deltaY >= 0) && (cr.bottom + evt.deltaY - boxOffY>= self.height)){ self.img.translateY += evt.deltaY; } var boxOffX = (document.documentElement.clientWidth - self.width)/2; if((cr.left + evt.deltaX <= boxOffX) && (cr.right + evt.deltaX - boxOffX >= self.width)){ self.img.translateX += evt.deltaX; } evt.preventDefault(); }
Sorry, something went wrong.
npm 刚发布了~~
No branches or pull requests
选区可以随意拖动,甚至可以拖动到图片外面。并没有限制只能在图片大小的范围的进行拖动。希望能修复。
The text was updated successfully, but these errors were encountered: