mirror of
https://github.com/konvajs/konva.git
synced 2025-11-18 17:21:36 +08:00
Using new pos from return instead of by reference.
This commit is contained in:
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.right]
|
||||||
* @param {Number} [config.dragBounds.bottom]
|
* @param {Number} [config.dragBounds.bottom]
|
||||||
* @param {Number} [config.dragBounds.left]
|
* @param {Number} [config.dragBounds.left]
|
||||||
|
* @param {Function} [config.dragBoundFunc] dragBoundFunc(pos, evt) should return new position
|
||||||
*/
|
*/
|
||||||
Kinetic.Node = Kinetic.Class.extend({
|
Kinetic.Node = Kinetic.Class.extend({
|
||||||
init: function(config) {
|
init: function(config) {
|
||||||
@@ -3539,7 +3540,7 @@ Kinetic.Stage = Kinetic.Container.extend({
|
|||||||
|
|
||||||
if(dbf !== undefined) {
|
if(dbf !== undefined) {
|
||||||
// execute dragBoundFunc if defined
|
// execute dragBoundFunc if defined
|
||||||
dbf(newNodePos, evt);
|
newNodePos = dbf.call(node, newNodePos, evt);
|
||||||
}
|
}
|
||||||
|
|
||||||
// constraint overrides
|
// 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.right]
|
||||||
* @param {Number} [config.dragBounds.bottom]
|
* @param {Number} [config.dragBounds.bottom]
|
||||||
* @param {Number} [config.dragBounds.left]
|
* @param {Number} [config.dragBounds.left]
|
||||||
|
* @param {Function} [config.dragBoundFunc] dragBoundFunc(pos, evt) should return new position
|
||||||
*/
|
*/
|
||||||
Kinetic.Node = Kinetic.Class.extend({
|
Kinetic.Node = Kinetic.Class.extend({
|
||||||
init: function(config) {
|
init: function(config) {
|
||||||
|
|||||||
@@ -815,7 +815,7 @@ Kinetic.Stage = Kinetic.Container.extend({
|
|||||||
|
|
||||||
if(dbf !== undefined) {
|
if(dbf !== undefined) {
|
||||||
// execute dragBoundFunc if defined
|
// execute dragBoundFunc if defined
|
||||||
dbf(newNodePos, evt);
|
newNodePos = dbf.call(node, newNodePos, evt);
|
||||||
}
|
}
|
||||||
|
|
||||||
// constraint overrides
|
// constraint overrides
|
||||||
|
|||||||
Reference in New Issue
Block a user