Skip to content

Commit 9f18d2c

Browse files
committed
Updating release (latest: 1.0.0)
1 parent 80ce9ef commit 9f18d2c

File tree

8 files changed

+170
-184
lines changed

8 files changed

+170
-184
lines changed

release/1.0.0/amd/jquerypp/event/drag/step.js

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,28 @@ define(['jquery', 'jquerypp/event/drag', 'jquerypp/dom/styles'], function ($) {
3131
return this;
3232
};
3333

34-
var oldPosition = $.Drag.prototype.position;
35-
$.Drag.prototype.position = function (offsetPositionv) {
36-
//adjust required_css_position accordingly
37-
if (this._step) {
38-
var step = this._step,
39-
center = step.center && step.center.toLowerCase(),
40-
movingSize = this.movingElement.dimensionsv('outer'),
41-
lot = step.offset.top() - (center && center != 'x' ? movingSize.height() / 2 : 0),
42-
lof = step.offset.left() - (center && center != 'y' ? movingSize.width() / 2 : 0);
43-
44-
if (this._step.x) {
45-
offsetPositionv.left(Math.round(lof + round(offsetPositionv.left() - lof, this._step.x)))
34+
(function () {
35+
var oldPosition = $.Drag.prototype.position;
36+
$.Drag.prototype.position = function (offsetPositionv) {
37+
//adjust required_css_position accordingly
38+
if (this._step) {
39+
var step = this._step,
40+
center = step.center && step.center.toLowerCase(),
41+
movingSize = this.movingElement.dimensionsv('outer'),
42+
lot = step.offset.top() - (center && center != 'x' ? movingSize.height() / 2 : 0),
43+
lof = step.offset.left() - (center && center != 'y' ? movingSize.width() / 2 : 0);
44+
45+
if (this._step.x) {
46+
offsetPositionv.left(Math.round(lof + round(offsetPositionv.left() - lof, this._step.x)))
47+
}
48+
if (this._step.y) {
49+
offsetPositionv.top(Math.round(lot + round(offsetPositionv.top() - lot, this._step.y)))
50+
}
4651
}
47-
if (this._step.y) {
48-
offsetPositionv.top(Math.round(lot + round(offsetPositionv.top() - lot, this._step.y)))
49-
}
50-
}
5152

52-
oldPosition.call(this, offsetPositionv)
53-
}
53+
oldPosition.call(this, offsetPositionv)
54+
}
55+
})();
5456

5557
return $;
5658
});

release/1.0.0/index.html

Lines changed: 0 additions & 11 deletions
This file was deleted.

release/1.0.0/jquerypp.js

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3111,26 +3111,28 @@
31113111
return this;
31123112
};
31133113

3114-
var oldPosition = $.Drag.prototype.position;
3115-
$.Drag.prototype.position = function (offsetPositionv) {
3116-
//adjust required_css_position accordingly
3117-
if (this._step) {
3118-
var step = this._step,
3119-
center = step.center && step.center.toLowerCase(),
3120-
movingSize = this.movingElement.dimensionsv('outer'),
3121-
lot = step.offset.top() - (center && center != 'x' ? movingSize.height() / 2 : 0),
3122-
lof = step.offset.left() - (center && center != 'y' ? movingSize.width() / 2 : 0);
3114+
(function () {
3115+
var oldPosition = $.Drag.prototype.position;
3116+
$.Drag.prototype.position = function (offsetPositionv) {
3117+
//adjust required_css_position accordingly
3118+
if (this._step) {
3119+
var step = this._step,
3120+
center = step.center && step.center.toLowerCase(),
3121+
movingSize = this.movingElement.dimensionsv('outer'),
3122+
lot = step.offset.top() - (center && center != 'x' ? movingSize.height() / 2 : 0),
3123+
lof = step.offset.left() - (center && center != 'y' ? movingSize.width() / 2 : 0);
31233124

3124-
if (this._step.x) {
3125-
offsetPositionv.left(Math.round(lof + round(offsetPositionv.left() - lof, this._step.x)))
3126-
}
3127-
if (this._step.y) {
3128-
offsetPositionv.top(Math.round(lot + round(offsetPositionv.top() - lot, this._step.y)))
3125+
if (this._step.x) {
3126+
offsetPositionv.left(Math.round(lof + round(offsetPositionv.left() - lof, this._step.x)))
3127+
}
3128+
if (this._step.y) {
3129+
offsetPositionv.top(Math.round(lot + round(offsetPositionv.top() - lot, this._step.y)))
3130+
}
31293131
}
3130-
}
31313132

3132-
oldPosition.call(this, offsetPositionv)
3133-
}
3133+
oldPosition.call(this, offsetPositionv)
3134+
}
3135+
})();
31343136

31353137
// ## jquery/event/fastfix/fastfix.js
31363138
// http://bitovi.com/blog/2012/04/faster-jquery-event-fix.html

release/1.0.0/jquerypp.min.js

Lines changed: 46 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

release/latest/amd/jquerypp/event/drag/step.js

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,28 @@ define(['jquery', 'jquerypp/event/drag', 'jquerypp/dom/styles'], function ($) {
3131
return this;
3232
};
3333

34-
var oldPosition = $.Drag.prototype.position;
35-
$.Drag.prototype.position = function (offsetPositionv) {
36-
//adjust required_css_position accordingly
37-
if (this._step) {
38-
var step = this._step,
39-
center = step.center && step.center.toLowerCase(),
40-
movingSize = this.movingElement.dimensionsv('outer'),
41-
lot = step.offset.top() - (center && center != 'x' ? movingSize.height() / 2 : 0),
42-
lof = step.offset.left() - (center && center != 'y' ? movingSize.width() / 2 : 0);
43-
44-
if (this._step.x) {
45-
offsetPositionv.left(Math.round(lof + round(offsetPositionv.left() - lof, this._step.x)))
34+
(function () {
35+
var oldPosition = $.Drag.prototype.position;
36+
$.Drag.prototype.position = function (offsetPositionv) {
37+
//adjust required_css_position accordingly
38+
if (this._step) {
39+
var step = this._step,
40+
center = step.center && step.center.toLowerCase(),
41+
movingSize = this.movingElement.dimensionsv('outer'),
42+
lot = step.offset.top() - (center && center != 'x' ? movingSize.height() / 2 : 0),
43+
lof = step.offset.left() - (center && center != 'y' ? movingSize.width() / 2 : 0);
44+
45+
if (this._step.x) {
46+
offsetPositionv.left(Math.round(lof + round(offsetPositionv.left() - lof, this._step.x)))
47+
}
48+
if (this._step.y) {
49+
offsetPositionv.top(Math.round(lot + round(offsetPositionv.top() - lot, this._step.y)))
50+
}
4651
}
47-
if (this._step.y) {
48-
offsetPositionv.top(Math.round(lot + round(offsetPositionv.top() - lot, this._step.y)))
49-
}
50-
}
5152

52-
oldPosition.call(this, offsetPositionv)
53-
}
53+
oldPosition.call(this, offsetPositionv)
54+
}
55+
})();
5456

5557
return $;
5658
});

release/latest/index.html

Lines changed: 0 additions & 11 deletions
This file was deleted.

release/latest/jquerypp.js

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3111,26 +3111,28 @@
31113111
return this;
31123112
};
31133113

3114-
var oldPosition = $.Drag.prototype.position;
3115-
$.Drag.prototype.position = function (offsetPositionv) {
3116-
//adjust required_css_position accordingly
3117-
if (this._step) {
3118-
var step = this._step,
3119-
center = step.center && step.center.toLowerCase(),
3120-
movingSize = this.movingElement.dimensionsv('outer'),
3121-
lot = step.offset.top() - (center && center != 'x' ? movingSize.height() / 2 : 0),
3122-
lof = step.offset.left() - (center && center != 'y' ? movingSize.width() / 2 : 0);
3114+
(function () {
3115+
var oldPosition = $.Drag.prototype.position;
3116+
$.Drag.prototype.position = function (offsetPositionv) {
3117+
//adjust required_css_position accordingly
3118+
if (this._step) {
3119+
var step = this._step,
3120+
center = step.center && step.center.toLowerCase(),
3121+
movingSize = this.movingElement.dimensionsv('outer'),
3122+
lot = step.offset.top() - (center && center != 'x' ? movingSize.height() / 2 : 0),
3123+
lof = step.offset.left() - (center && center != 'y' ? movingSize.width() / 2 : 0);
31233124

3124-
if (this._step.x) {
3125-
offsetPositionv.left(Math.round(lof + round(offsetPositionv.left() - lof, this._step.x)))
3126-
}
3127-
if (this._step.y) {
3128-
offsetPositionv.top(Math.round(lot + round(offsetPositionv.top() - lot, this._step.y)))
3125+
if (this._step.x) {
3126+
offsetPositionv.left(Math.round(lof + round(offsetPositionv.left() - lof, this._step.x)))
3127+
}
3128+
if (this._step.y) {
3129+
offsetPositionv.top(Math.round(lot + round(offsetPositionv.top() - lot, this._step.y)))
3130+
}
31293131
}
3130-
}
31313132

3132-
oldPosition.call(this, offsetPositionv)
3133-
}
3133+
oldPosition.call(this, offsetPositionv)
3134+
}
3135+
})();
31343136

31353137
// ## jquery/event/fastfix/fastfix.js
31363138
// http://bitovi.com/blog/2012/04/faster-jquery-event-fix.html

0 commit comments

Comments
 (0)