MCPcopy
hub / github.com/plotly/plotly.js / waitForDragCoverRemoval

Function waitForDragCoverRemoval

test/jasmine/assets/drag.js:187–206  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

185}
186
187function waitForDragCoverRemoval() {
188 return new Promise(function(resolve) {
189 var interval = 5;
190 var timeout = 5000;
191
192 var id = setInterval(function() {
193 var dragCoverNode = document.querySelector('.dragcover');
194 if(!dragCoverNode) {
195 clearInterval(id);
196 resolve(dragCoverNode);
197 }
198
199 timeout -= interval;
200 if(timeout < 0) {
201 clearInterval(id);
202 throw new Error('waitForDragCoverRemoval: timeout');
203 }
204 }, interval);
205 });
206}
207
208module.exports = drag;
209drag.makeFns = makeFns;

Callers 1

endFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…