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

Scroll offset problem when using in modal panel #27

Closed
GoogleCodeExporter opened this issue Mar 21, 2015 · 1 comment
Closed

Scroll offset problem when using in modal panel #27

GoogleCodeExporter opened this issue Mar 21, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Use in modal panel (in my case RichFaces one)
2. Scroll a bit the full page
3. Test click in picture

What is the expected output? What do you see instead?

Expecting selection on real mouse position, instead, selection start the
scrolling offset below the expected position.

What version of the product are you using? On what operating system?

jsCropper 1.2.0 on Firefox 3.0.7 on Windows XP SP3 with Tomcat server

Please provide any additional information below.

I've modified my cropper.js in getCurPos function :

---------------------------------------------

getCurPos: function( e ) {
        // get the offsets for the wrapper within the document
        var el = this.imgWrap;

        var wrapOffsets = Element.cumulativeOffset( el );
        var wrapScrollers = Element.cumulativeScrollOffset( el );

        return curPos = {
            x: Event.pointerX(e) - wrapOffsets[0] - wrapScrollers[0],
            y: Event.pointerY(e) - wrapOffsets[1] - wrapScrollers[1]
        }
    },

-------------------------------------------------

with this new code, it is working properly. Note, i'm using javascript
libraries from RichFaces.

Libraries versions :

prototype.js 1.6.0.X
scriptaculous.js 1.8.2
builder.js 1.8.2
dragdrop.js 1.8.2

Hope it will help someone!

Original issue reported on code.google.com by alexande...@gmail.com on 8 Mar 2009 at 5:21

@GoogleCodeExporter
Copy link
Author

This suggestion has been incorporated into the latest release (1.2.1)

Original comment by david.sp...@gmail.com on 6 Oct 2009 at 3:04

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant