infinityskyline
infinityskyline

Reputation: 409

When using CSS zoom, query-ui slider is behaving wrongly

I have scale applied to the main wrapper of my application :

transform-origin: center top 0px;
transform: translate(0px, 0px) scale(2.21538);

I have a jquery slider which is not behaving as expected because of scaling.

Upvotes: 0

Views: 190

Answers (1)

Prasad Rasapally
Prasad Rasapally

Reputation: 21

I have modified the jquery.ui.js library in my local files to make it work

_slide: function( event, index, newVal ) {
  //add below line as first line of this function

  newVal = newVal / scaleFactor;

  //jquery code goes here
}

if you are using minified version

_slide: function(e, t, n) {
  n = n / scaleFactor;
}

hare the scaleFactor is the scaling value, 2.21538 in your case. scaleFactor variable must be available in global scope, otherwise will get error.

Upvotes: 1

Related Questions