Comments (2)
Hi @KriekyNies
Thanks for the contribution.
I'll definitely will take a look to it as soon as I can and add them to the library.
I'll let you know.
Thanks!
from jquery.pan.
Hi again @KriekyNies
I've updated the package adding support for rotation. However I needed to do much more than what you did because the way you're doing it doesn't support the panning of the image correctly.
Since the original code positioned the zoomed image using absolute position, when you rotate the image the coordinate system changes too and the absolute position simply doesn't work. I've rewritten the positioning logic to position the image using transforms too. That (and the rotation itself) removes support for IE 8 and 9, and the plugin now only works with IE10+ (fair enough these days).
Apart from that I've limited internally the rotation between 0 -360 degrees. Although in practice there's no difference and you can rotate clockwise or aws as much as you want, internally it's limited that way.
Rotation controls can be hidden and disabled (makes sense in many situations) just by passing a false
argument to the pan()
method (read the readme.md
page for details).
I've created new action icons, more neutral and at the same time being able to be spotted easily under most circumstances. honestly I didn't liked the yellow glowing in your new version. But obviously you can change them locally in your app and they'll work OK.
It doesn't keep the state of rotation as you suggested, though. I don't see that this make sense in most of the applications (maybe in yours, but not in 99% I can think of). Every time an image is loaded for zoom, pan and rotate, it's shown in ins original position and size.
Finally I've added support to show loading progress (it had a GIF image but was never implemented) and squashed a minor bug.
You can check the new version in action in the demo page.
Hope you like it although it's not exactly what you wanted (but mostly).
Thanks for the suggestion, although finally I haven't used most of it. It has made the plugin better 😊
It's already in "releases" and in the npm repository.
Cheers!
from jquery.pan.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery.pan.