mirror of
https://github.com/konvajs/konva.git
synced 2026-01-02 20:42:42 +08:00
converting bufferImage to imageBuffer in Image.js
This commit is contained in:
10
dist/kinetic-core.js
vendored
10
dist/kinetic-core.js
vendored
@@ -4559,23 +4559,23 @@ Kinetic.Image = Kinetic.Shape.extend({
|
|||||||
|
|
||||||
var that = this;
|
var that = this;
|
||||||
Kinetic.Type._getImage(imageData, function(imageObj) {
|
Kinetic.Type._getImage(imageData, function(imageObj) {
|
||||||
that.bufferImage = imageObj;
|
that.imageBuffer = imageObj;
|
||||||
if(callback) {
|
if(callback) {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch(e) {
|
catch(e) {
|
||||||
Kinetic.Global.warn('Unable to create buffer image.');
|
Kinetic.Global.warn('Unable to create image buffer.');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* clear buffer image
|
* clear buffer image
|
||||||
* @name clearBufferImage
|
* @name clearImageBuffer
|
||||||
* @methodOf Kinetic.Image.prototype
|
* @methodOf Kinetic.Image.prototype
|
||||||
*/
|
*/
|
||||||
clearBufferImage: function() {
|
clearImageBuffer: function() {
|
||||||
delete this.bufferImage;
|
delete this.imageBuffer;
|
||||||
},
|
},
|
||||||
_syncSize: function() {
|
_syncSize: function() {
|
||||||
if(this.attrs.image) {
|
if(this.attrs.image) {
|
||||||
|
|||||||
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
@@ -125,23 +125,23 @@ Kinetic.Image = Kinetic.Shape.extend({
|
|||||||
|
|
||||||
var that = this;
|
var that = this;
|
||||||
Kinetic.Type._getImage(imageData, function(imageObj) {
|
Kinetic.Type._getImage(imageData, function(imageObj) {
|
||||||
that.bufferImage = imageObj;
|
that.imageBuffer = imageObj;
|
||||||
if(callback) {
|
if(callback) {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch(e) {
|
catch(e) {
|
||||||
Kinetic.Global.warn('Unable to create buffer image.');
|
Kinetic.Global.warn('Unable to create image buffer.');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* clear buffer image
|
* clear buffer image
|
||||||
* @name clearBufferImage
|
* @name clearImageBuffer
|
||||||
* @methodOf Kinetic.Image.prototype
|
* @methodOf Kinetic.Image.prototype
|
||||||
*/
|
*/
|
||||||
clearBufferImage: function() {
|
clearImageBuffer: function() {
|
||||||
delete this.bufferImage;
|
delete this.imageBuffer;
|
||||||
},
|
},
|
||||||
_syncSize: function() {
|
_syncSize: function() {
|
||||||
if(this.attrs.image) {
|
if(this.attrs.image) {
|
||||||
|
|||||||
Reference in New Issue
Block a user