mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
fix #164 prepend # to colorKey so that events work again in non webit browsers
This commit is contained in:
parent
393a9687dc
commit
e6eb647462
@ -216,12 +216,12 @@ Kinetic.HitRenderer.prototype = {
|
|||||||
_fill: function(shape) {
|
_fill: function(shape) {
|
||||||
var context = this.context;
|
var context = this.context;
|
||||||
context.save();
|
context.save();
|
||||||
context.fillStyle = shape.colorKey;
|
context.fillStyle = '#' + shape.colorKey;
|
||||||
context.fill(context);
|
context.fill(context);
|
||||||
context.restore();
|
context.restore();
|
||||||
},
|
},
|
||||||
_stroke: function(shape) {
|
_stroke: function(shape) {
|
||||||
var context = this.context, stroke = shape.colorKey, strokeWidth = shape.getStrokeWidth();
|
var context = this.context, stroke = '#' + shape.colorKey, strokeWidth = shape.getStrokeWidth();
|
||||||
if(stroke || strokeWidth) {
|
if(stroke || strokeWidth) {
|
||||||
context.save();
|
context.save();
|
||||||
context.lineWidth = strokeWidth || 2;
|
context.lineWidth = strokeWidth || 2;
|
||||||
|
@ -362,7 +362,7 @@ Test.Modules.MANUAL = {
|
|||||||
layer.add(star);
|
layer.add(star);
|
||||||
stage.add(layer);
|
stage.add(layer);
|
||||||
|
|
||||||
//document.body.appendChild(layer.bufferCanvas.element)
|
showHit(layer);
|
||||||
},
|
},
|
||||||
'EVENTS - drag events click': function(containerId) {
|
'EVENTS - drag events click': function(containerId) {
|
||||||
var stage = new Kinetic.Stage({
|
var stage = new Kinetic.Stage({
|
||||||
|
Loading…
Reference in New Issue
Block a user