Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pissang committed Nov 4, 2014
1 parent 4ec7a06 commit 3e21ad6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/util/shape/Icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,18 @@ define(function (require) {
pin : _iconPin,
image : _iconImage
},
brush: function (ctx, isHighlight, refresh) {
var style = isHighlight ? this.highlightStyle : this.style;
style = style || {};
var iconType = style.iconType || this.style.iconType;
if (iconType === 'image') {
var ImageShape = require('zrender/shape/Image');
ImageShape.prototype.brush.call(this, ctx, isHighlight, refresh);
} else {
var BaseShape = require('zrender/shape/Base');
BaseShape.prototype.brush.call(this, ctx, isHighlight, refresh);
}
},
/**
* 创建矩形路径
* @param {Context2D} ctx Canvas 2D上下文
Expand Down

0 comments on commit 3e21ad6

Please sign in to comment.