Skip to content

Commit b20b4ba

Browse files
committed
bug fix "pin" property
1 parent 492b3a6 commit b20b4ba

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

jquery.data-parallax.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,11 +505,17 @@
505505
});
506506

507507
function PinScene($el, options) {
508-
options.to = convertToElement(options.to) || $el[0];
508+
options.to = convertToElement(options.to);
509+
isElement(options.to) || (options.to = $el[0]);
509510
typeof options.triggerHook != "undefined" || (options.triggerHook = 0);
510511
Scene.call(this, $el, options);
511512
}
512513
PinScene.prototype = inherit(Scene.prototype, {
514+
updateStart: function() {
515+
if (this.state != Scene.STATE_DURING) {
516+
Scene.prototype.updateStart.call(this);
517+
}
518+
},
513519
_needsUpdate: function() {
514520
return (typeof this.prevState != "undefined" || this.state == Scene.STATE_DURING) &&
515521
this.prevState != this.state;

0 commit comments

Comments
 (0)