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

Image container size is larger than image orignal size. #165

Open
affan00 opened this issue Jul 19, 2017 · 0 comments
Open

Image container size is larger than image orignal size. #165

affan00 opened this issue Jul 19, 2017 · 0 comments

Comments

@affan00
Copy link

affan00 commented Jul 19, 2017

I am using elevate zoom on one of my projects, It works fine when the image size is greater than image container size but it's not working fine if image original size is less than image container size.
Here is my code

onClickSnapshotMagnifier = ->

  $('#snapshot-magnifier').on 'click', ->

    $('.zoomContainer').remove()

    if $('.enabled').length == 0

      $('#imgPlayback').elevateZoom

        responsive: true,

        zoomType: "inner",

        cursor: "crosshair",

        scrollZoom: true

      $(this).toggleClass 'enabled'

    else

      $(this).toggleClass 'enabled'

      $('.zoomContainer').hide()

"#snapshot-magnifier" is the id of the button for activate/deactivate elevate zoom.
Here is the snapshot if the image size is less than container size.
image

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