don't apply buffer fill if fill is not defined and shape contains an image

This commit is contained in:
Eric Rowell
2012-08-21 19:32:04 -07:00
parent cb68fa0215
commit 4b142db887
3 changed files with 7 additions and 7 deletions

View File

@@ -3,7 +3,7 @@
* http://www.kineticjs.com/
* Copyright 2012, Eric Rowell
* Licensed under the MIT or GPL Version 2 licenses.
* Date: Aug 20 2012
* Date: Aug 21 2012
*
* Copyright (C) 2011 - 2012 by Eric Rowell
*
@@ -3805,7 +3805,7 @@ Kinetic.Shape = Kinetic.Node.extend({
this.nodeType = 'Shape';
this.appliedShadow = false;
// set colorKey
// set colorKey
var shapes = Kinetic.Global.shapes;
var key;
while(true) {
@@ -4113,7 +4113,7 @@ Kinetic.Shape = Kinetic.Node.extend({
for(var n = 0; n < wl.length; n++) {
var key = wl[n];
attrs[key] = this.attrs[key];
if(this.attrs[key] || (key === 'fill' && !this.attrs.stroke)) {
if(this.attrs[key] || (key === 'fill' && !this.attrs.stroke && !('image' in this.attrs))) {
this.attrs[key] = '#' + this.colorKey;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -64,7 +64,7 @@ Kinetic.Shape = Kinetic.Node.extend({
this.nodeType = 'Shape';
this.appliedShadow = false;
// set colorKey
// set colorKey
var shapes = Kinetic.Global.shapes;
var key;
while(true) {
@@ -372,7 +372,7 @@ Kinetic.Shape = Kinetic.Node.extend({
for(var n = 0; n < wl.length; n++) {
var key = wl[n];
attrs[key] = this.attrs[key];
if(this.attrs[key] || (key === 'fill' && !this.attrs.stroke)) {
if(this.attrs[key] || (key === 'fill' && !this.attrs.stroke && !('image' in this.attrs))) {
this.attrs[key] = '#' + this.colorKey;
}
}