From 375319bd3763f9d42867697cb173c3ecabcb379b Mon Sep 17 00:00:00 2001 From: 06wj <06wj@163.com> Date: Wed, 17 Feb 2016 10:39:23 +0800 Subject: [PATCH] refactor: use renderer.renderType to check isDOMrenderer --- src/view/DOMElement.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/view/DOMElement.js b/src/view/DOMElement.js index e904febd..103f6135 100644 --- a/src/view/DOMElement.js +++ b/src/view/DOMElement.js @@ -65,8 +65,8 @@ var DOMElement = Class.create(/** @lends DOMElement.prototype */{ * @private */ render: function(renderer, delta){ - var canvas = renderer.canvas; - if(canvas.getContext){ + if(renderer.renderType !== 'dom'){ + var canvas = renderer.canvas; var elem = this.drawable.domElement, depth = this.depth, nextElement = canvas.nextSibling, nextDepth; if(elem.parentNode) return;