mirror of
https://github.com/konvajs/konva.git
synced 2025-09-18 18:27:58 +08:00
fixed up Image hit draw func
This commit is contained in:
@@ -56,13 +56,19 @@ Kinetic.Image.prototype = {
|
||||
drawHitFunc: function(context) {
|
||||
var width = this.getWidth(), height = this.getHeight(), imageBuffer = this.imageBuffer, appliedShadow = false;
|
||||
|
||||
if(imageBuffer) {
|
||||
this.drawImage(context, this.imageBuffer, 0, 0, width, height);
|
||||
|
||||
context.beginPath();
|
||||
context.rect(0, 0, width, height);
|
||||
context.closePath();
|
||||
this.stroke(context);
|
||||
}
|
||||
else {
|
||||
context.beginPath();
|
||||
context.rect(0, 0, width, height);
|
||||
context.closePath();
|
||||
this.fillStroke(context);
|
||||
|
||||
if(imageBuffer) {
|
||||
this.drawImage(context, this.imageBuffer, 0, 0, width, height);
|
||||
}
|
||||
},
|
||||
/**
|
||||
|
@@ -771,6 +771,7 @@ Test.Modules.NODE = {
|
||||
|
||||
|
||||
cachedShape.createImageBuffer(function() {
|
||||
console.log(111)
|
||||
layer.draw();
|
||||
//console.log(layer.toDataURL());
|
||||
warn(dataUrls['regular and cahced polygon'] === layer.toDataURL(), 'regular and cached polygon layer data url is incorrect');
|
||||
|
@@ -85,7 +85,7 @@ Test.Modules.LINE = {
|
||||
blur: 10,
|
||||
offset: [20, 20]
|
||||
},
|
||||
opacity: 0.2
|
||||
//opacity: 0.2
|
||||
});
|
||||
|
||||
layer.add(line);
|
||||
|
@@ -392,7 +392,7 @@ Test.Modules.PATH = {
|
||||
layer.add(group);
|
||||
stage.add(layer);
|
||||
|
||||
//document.body.appendChild(layer.bufferCanvas.element)
|
||||
showHit(layer);
|
||||
|
||||
},
|
||||
'Able to determine point on line some distance from another point on line': function(containerId) {
|
||||
|
Reference in New Issue
Block a user