Skip to content

Commit

Permalink
Preview on add debugged (bug caused by wab 1.2).
Browse files Browse the repository at this point in the history
  • Loading branch information
jcornet committed Aug 28, 2015
1 parent d2fbf9a commit 48e2d2a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -981,9 +981,9 @@ define([
editorEnableMapPreview : function (bool) {
//if deactivate
if (!bool) {
//Hide point
if (this._editorConfig["phantom"]["point"])
this._editorConfig["phantom"]["point"].hide();
//Hide layer
if (this._editorConfig["phantom"]["layer"])
this._editorConfig["phantom"]["layer"].setVisibility(false);

this._editorConfig["phantom"]["symbol"] = false;

Expand All @@ -1008,13 +1008,14 @@ define([

this.map.addLayer(this._editorConfig["phantom"]["layer"]);
} else {
this._editorConfig["phantom"]["layer"].setVisibility(true);
this._editorConfig["phantom"]["point"].setSymbol(this._editorConfig["phantom"]["symbol"]);
}

//Track mouse on map
if (!this._editorConfig["phantom"]["handle"]) {
this._editorConfig["phantom"]["handle"] = on(this.map, 'mouse-move, mouse-out, mouse-over', lang.hitch(this, function (evt) {
if (this.state === 'opened') {
if (this.state === 'opened' || this.state === 'active') {
switch (evt.type) {
case 'mousemove':
if (this._editorConfig["phantom"]["point"]) {
Expand Down

0 comments on commit 48e2d2a

Please sign in to comment.