You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.
In esri code below, scope.$apply() is causing this error. When we change $apply to $evalAsync the error isn't appearing anymore.
map.on('extent-change',function(e){if(attrs.extentChange){self.extentChange()(e);}// prevent circular updates between $watch and $applyif(self.inUpdateCycle){return;}self.inUpdateCycle=true;scope.$apply(function(){// update scope propertiesupdateCenterAndZoom(self,map);$timeout(function(){// this will be executed after the $digest cycleself.inUpdateCycle=false;},0);});});
@Cezus thanks for bringing this to our attention. I have looked into it and will continue to investigate and test between using $evalAsync and $applyAsync.
As a side note in your plnkr, (and thanks for providing a reproduction case), I would also advise not to call esriLoader.require every time your button click handler function is entered. You could call esriLoader.requireonce at the beginning of your controller scope and set the imported modules to scope properties, for example, that you can reference in your button click handler. Just a suggestion in case you are doing this in your other applications.
@jwasilgeo Great! Thank you for the fast response.
"I would also advise not to call esriLoader.require every time your button click handler function is entered."
Thank you for the headsup, the plunker was a fast write.
@Cezus sorry for the delay. I hope to have a fix (and new release version) for this sometime soon. Hopefully you've been able to continue on your own in the meantime?
We are using the v1 directives
Expected behavior
No errors in Console.
Actual behavior
Map.setExtent() sometimes generates the error as mentioned in the subject. I expect that when the extent is set it will not generate this error.
"$digest already in progress"
Steps to reproduce the behavior
In the link below:
https://embed.plnkr.co/6C7GsTibHykPJQcxeU2g/
For us working solution:
In esri code below,
scope.$apply()
is causing this error. When we change $apply to $evalAsync the error isn't appearing anymore.For more information about $evalAsync:
http://stackoverflow.com/questions/12729122/angularjs-prevent-error-digest-already-in-progress-when-calling-scope-apply/23102223#23102223
With kind regards
The text was updated successfully, but these errors were encountered: