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

Function waitForDragCover

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

Source from the content-addressed store, hash-verified

164}
165
166function waitForDragCover() {
167 return new Promise(function(resolve) {
168 var interval = 5;
169 var timeout = 5000;
170
171 var id = setInterval(function() {
172 var dragCoverNode = document.querySelector('.dragcover');
173 if(dragCoverNode) {
174 clearInterval(id);
175 resolve(dragCoverNode);
176 }
177
178 timeout -= interval;
179 if(timeout < 0) {
180 clearInterval(id);
181 throw new Error('waitForDragCover: timeout');
182 }
183 }, interval);
184 });
185}
186
187function waitForDragCoverRemoval() {
188 return new Promise(function(resolve) {

Callers 1

startFunction · 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…