Browse Source

build:lib

windsome.feng 7 years ago
parent
commit
6d712b9bb4
1 changed files with 5 additions and 3 deletions
  1. 5 3
      lib/api.js

+ 5 - 3
lib/api.js

@@ -182,7 +182,7 @@ var commonUpdate = function commonUpdate(entity, newOptions, newEvents, oldOptio
     }
   });
   if (!isEmpty(props) || !isEmpty(events)) {
-    xdebug(__func__, 'update:', props, events
+    xdebug(__func__, 'update:', entity, props, events
     // newOptions,
     // newEvents,
     // oldOptions,
@@ -331,8 +331,10 @@ export var updateMarker = function updateMarker(entity, newOptions, newEvents, o
       return entity.setOffset(v);
     },
     icon: function icon(v) {
-      return entity.setIcon(v);
-    },
+      setTimeout(function () {
+        return entity.setIcon(v);
+      }, 0);
+    }, // 这里有一个bug,在某些时候页面更改icon时,界面上并不生效.
     content: function content(v) {
       return entity.setContent(v);
     },