From 284e6ab9038c997e62250b1c3d5d686c250d3dfe Mon Sep 17 00:00:00 2001 From: David Manthey Date: Thu, 11 Apr 2019 08:07:20 -0400 Subject: [PATCH] Don't remove and readd the actor when rebuilding webgl points. Also, don't rerender as part of build; other actions rerender when appropriate, so this is wasted time. --- src/webgl/pointFeature.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/webgl/pointFeature.js b/src/webgl/pointFeature.js index a9c8396646..07de3cb3d4 100644 --- a/src/webgl/pointFeature.js +++ b/src/webgl/pointFeature.js @@ -456,15 +456,10 @@ var webgl_pointFeature = function (arg) { * @returns {this} */ this._build = function () { - - if (m_actor) { - m_this.renderer().contextRenderer().removeActor(m_actor); - } - createGLPoints(); - - m_this.renderer().contextRenderer().addActor(m_actor); - m_this.renderer().contextRenderer().render(); + if (!m_this.renderer().contextRenderer().hasActor(m_actor)) { + m_this.renderer().contextRenderer().addActor(m_actor); + } m_this.buildTime().modified(); return m_this; };