MCPcopy Index your code
hub / github.com/SnapDrop/snapdrop / setProgress

Method setProgress

client/scripts/ui.js:153–168  ·  view source on GitHub ↗
(progress)

Source from the content-addressed store, hash-verified

151 }
152
153 setProgress(progress) {
154 if (progress > 0) {
155 this.$el.setAttribute('transfer', '1');
156 }
157 if (progress > 0.5) {
158 this.$progress.classList.add('over50');
159 } else {
160 this.$progress.classList.remove('over50');
161 }
162 const degrees = `rotate(${360 * progress}deg)`;
163 this.$progress.style.setProperty('--progress', degrees);
164 if (progress >= 1) {
165 this.setProgress(0);
166 this.$el.removeAttribute('transfer');
167 }
168 }
169
170 _onDrop(e) {
171 e.preventDefault();

Callers 1

_onFileProgressMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected