From 8f1da6b2dde3fe76e553014fabc5301ae8156743 Mon Sep 17 00:00:00 2001 From: 06wj <06wj@163.com> Date: Wed, 10 May 2017 21:14:44 +0800 Subject: [PATCH] feat: add drawable crossOrigin support --- src/view/Drawable.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/view/Drawable.js b/src/view/Drawable.js index aa643ed2..6801e52a 100644 --- a/src/view/Drawable.js +++ b/src/view/Drawable.js @@ -58,6 +58,9 @@ var Drawable = Class.create(/** @lends Drawable.prototype */{ me.image = null; //load image dynamically var img = new Image(); + if(properties.crossOrigin){ + img.crossOrigin = properties.crossOrigin; + } img.onload = function(){ img.onload = null; me.init(img);