mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 07:19:19 +08:00
Using new pos from return instead of by reference.
This commit is contained in:
parent
15fe79873c
commit
aaeb49acf4
3
dist/kinetic-core.js
vendored
3
dist/kinetic-core.js
vendored
@ -1245,6 +1245,7 @@ requestAnimFrame = (function(callback) {
|
||||
* @param {Number} [config.dragBounds.right]
|
||||
* @param {Number} [config.dragBounds.bottom]
|
||||
* @param {Number} [config.dragBounds.left]
|
||||
* @param {Function} [config.dragBoundFunc] dragBoundFunc(pos, evt) should return new position
|
||||
*/
|
||||
Kinetic.Node = Kinetic.Class.extend({
|
||||
init: function(config) {
|
||||
@ -3539,7 +3540,7 @@ Kinetic.Stage = Kinetic.Container.extend({
|
||||
|
||||
if(dbf !== undefined) {
|
||||
// execute dragBoundFunc if defined
|
||||
dbf(newNodePos, evt);
|
||||
newNodePos = dbf.call(node, newNodePos, evt);
|
||||
}
|
||||
|
||||
// constraint overrides
|
||||
|
2
dist/kinetic-core.min.js
vendored
2
dist/kinetic-core.min.js
vendored
File diff suppressed because one or more lines are too long
@ -30,6 +30,7 @@
|
||||
* @param {Number} [config.dragBounds.right]
|
||||
* @param {Number} [config.dragBounds.bottom]
|
||||
* @param {Number} [config.dragBounds.left]
|
||||
* @param {Function} [config.dragBoundFunc] dragBoundFunc(pos, evt) should return new position
|
||||
*/
|
||||
Kinetic.Node = Kinetic.Class.extend({
|
||||
init: function(config) {
|
||||
|
@ -815,7 +815,7 @@ Kinetic.Stage = Kinetic.Container.extend({
|
||||
|
||||
if(dbf !== undefined) {
|
||||
// execute dragBoundFunc if defined
|
||||
dbf(newNodePos, evt);
|
||||
newNodePos = dbf.call(node, newNodePos, evt);
|
||||
}
|
||||
|
||||
// constraint overrides
|
||||
|
Loading…
Reference in New Issue
Block a user