@@ -548,9 +548,16 @@ var svgRenderer = function (arg) {
548548 return m_this ;
549549 } ;
550550
551+ /**
552+ * Schedule an update in the next render frame.
553+ */
554+ this . _scheduleUpdate = function ( ) {
555+ m_this . layer ( ) . map ( ) . scheduleAnimationFrame ( m_this . _renderFrame ) ;
556+ } ;
557+
551558 /**
552559 * Render all features that are marked as needing an update. This should
553- * only be called duration an animation frame.
560+ * only be called during an animation frame.
554561 */
555562 this . _renderFrame = function ( ) {
556563 var id ;
@@ -566,6 +573,11 @@ var svgRenderer = function (arg) {
566573 m_this . _renderFeature ( id ) ;
567574 }
568575 }
576+ for ( id in m_features ) {
577+ if ( m_features . hasOwnProperty ( id ) && ids [ id ] === undefined ) {
578+ m_this . select ( id ) . attr ( 'visibility' , ! m_features [ id ] . visible || m_features [ id ] . visible ( ) ? 'visible' : 'hidden' ) ;
579+ }
580+ }
569581 } ;
570582
571583 /**
@@ -580,6 +592,7 @@ var svgRenderer = function (arg) {
580592 if ( ! m_features [ id ] ) {
581593 return m_this ;
582594 }
595+ m_this . select ( id ) . remove ( ) ;
583596 var data = m_features [ id ] . data ,
584597 index = m_features [ id ] . index ,
585598 style = m_features [ id ] . style ,
@@ -598,7 +611,7 @@ var svgRenderer = function (arg) {
598611 rendersel . attr ( 'class' , classes . concat ( [ id ] ) . join ( ' ' ) ) ;
599612 setStyles ( rendersel , style ) ;
600613 if ( visible ) {
601- rendersel . style ( 'visibility' , visible ( ) ? 'visible' : 'hidden' ) ;
614+ rendersel . attr ( 'visibility' , visible ( ) ? 'visible' : 'hidden' ) ;
602615 }
603616 if ( entries . size ( ) && m_features [ id ] . sortByZ ) {
604617 selection . sort ( function ( a , b ) {
0 commit comments