mirror of
https://github.com/konvajs/konva.git
synced 2025-05-06 14:47:52 +08:00
updated global object utilities
This commit is contained in:
parent
5765ab749b
commit
ac3f512ab8
3
dist/kinetic-core.js
vendored
3
dist/kinetic-core.js
vendored
@ -159,7 +159,7 @@ Kinetic.GlobalObject = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/*
|
/*
|
||||||
* cherry-picked and modified utilities from underscore.js
|
* cherry-picked utilities from underscore.js
|
||||||
*/
|
*/
|
||||||
_isElement: function(obj) {
|
_isElement: function(obj) {
|
||||||
return !!(obj && obj.nodeType == 1);
|
return !!(obj && obj.nodeType == 1);
|
||||||
@ -171,6 +171,7 @@ Kinetic.GlobalObject = {
|
|||||||
return Object.prototype.toString.call(obj) == '[object Array]';
|
return Object.prototype.toString.call(obj) == '[object Array]';
|
||||||
},
|
},
|
||||||
_isObject: function(obj) {
|
_isObject: function(obj) {
|
||||||
|
//return obj === Object(obj);
|
||||||
return (obj !== undefined && obj.constructor == Object);
|
return (obj !== undefined && obj.constructor == Object);
|
||||||
},
|
},
|
||||||
_isNumber: function(obj) {
|
_isNumber: function(obj) {
|
||||||
|
4
dist/kinetic-core.min.js
vendored
4
dist/kinetic-core.min.js
vendored
File diff suppressed because one or more lines are too long
@ -131,7 +131,7 @@ Kinetic.GlobalObject = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/*
|
/*
|
||||||
* cherry-picked and modified utilities from underscore.js
|
* cherry-picked utilities from underscore.js
|
||||||
*/
|
*/
|
||||||
_isElement: function(obj) {
|
_isElement: function(obj) {
|
||||||
return !!(obj && obj.nodeType == 1);
|
return !!(obj && obj.nodeType == 1);
|
||||||
@ -143,6 +143,7 @@ Kinetic.GlobalObject = {
|
|||||||
return Object.prototype.toString.call(obj) == '[object Array]';
|
return Object.prototype.toString.call(obj) == '[object Array]';
|
||||||
},
|
},
|
||||||
_isObject: function(obj) {
|
_isObject: function(obj) {
|
||||||
|
//return obj === Object(obj);
|
||||||
return (obj !== undefined && obj.constructor == Object);
|
return (obj !== undefined && obj.constructor == Object);
|
||||||
},
|
},
|
||||||
_isNumber: function(obj) {
|
_isNumber: function(obj) {
|
||||||
|
@ -390,7 +390,7 @@ Test.prototype.tests = {
|
|||||||
layer.add(Ellipse);
|
layer.add(Ellipse);
|
||||||
stage.add(layer);
|
stage.add(layer);
|
||||||
},
|
},
|
||||||
'*EVENTS - move mouse from shape to another shape in same layer': function(containerId) {
|
'EVENTS - move mouse from shape to another shape in same layer': function(containerId) {
|
||||||
var stage = new Kinetic.Stage({
|
var stage = new Kinetic.Stage({
|
||||||
container: containerId,
|
container: containerId,
|
||||||
width: 578,
|
width: 578,
|
||||||
|
Loading…
Reference in New Issue
Block a user