MCPcopy Create free account
hub / github.com/32comic/image2pixel-web / handleDrop

Method handleDrop

pixelizer.js:133–143  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

131 }
132
133 handleDrop(e) {
134 e.preventDefault();
135 e.currentTarget.classList.remove('drag-over');
136
137 const files = Array.from(e.dataTransfer.files);
138 const imageFile = files.find(file => file.type.startsWith('image/'));
139
140 if (imageFile) {
141 this.loadImage(imageFile);
142 }
143 }
144
145 handleFileSelect(e) {
146 const file = e.target.files[0];

Callers

nothing calls this directly

Calls 1

loadImageMethod · 0.95

Tested by

no test coverage detected