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
upload-section adds an image to the canvas when deleting.
Expected:
Image should be deleted and no image added to the canvas.
Note:
If people agree this is an issue.
I submitted a pr to resolve this issue #47. I had to solve this in my own project so I thought id submit the solution for others to benefit. Happy to have further discussion if you have any questions / concerns.
Why:
ImagesGrid, registers the function getCredit first and does the delete action. Next, ImagesGrid - onSelect is activated which adds an element to the canvas via addElement.
There is nothing in the callback parameters for either function getCredit nor onSelect that can identify that a delete has occurred instead of a select. getCredit's buttonClick property: event.nativeEvent.preventDefaulthas no effect on onSelect.
Steps to reproduce:
src/sections/upload-section.js
Uncommenting the following line in App.js:
DEFAULT_SECTIONS.unshift(UploadSection);
add import {UploadSection} from './sections/upload-section' to the top of App.js
Video of issue: (deleted image is added to the canvas)
delete-incorrectly-loads-image.mov
Video with solution: (deleted image does not get added to the canvas)
fixed.mov
Cheers,
Michael Dimmitt
The text was updated successfully, but these errors were encountered:
MichaelDimmitt
changed the title
upload-section delete functionality incorrectly adds an image to the canvas.
upload-section deleted image gets added to the canvas.
Sep 28, 2024
Issue:
upload-section adds an image to the canvas when deleting.
Expected:
Image should be deleted and no image added to the canvas.
Note:
If people agree this is an issue.
I submitted a pr to resolve this issue #47. I had to solve this in my own project so I thought id submit the solution for others to benefit. Happy to have further discussion if you have any questions / concerns.
Why:
ImagesGrid, registers the function
getCredit
first and does the delete action. Next,ImagesGrid - onSelect
is activated which adds an element to the canvas via addElement.There is nothing in the callback parameters for either function
getCredit
noronSelect
that can identify that a delete has occurred instead of a select.getCredit
's buttonClick property:event.nativeEvent.preventDefault
has no effect ononSelect
.Steps to reproduce:
src/sections/upload-section.js
Uncommenting the following line in App.js:
DEFAULT_SECTIONS.unshift(UploadSection);
add import {UploadSection} from './sections/upload-section' to the top of App.js
Video of issue: (deleted image is added to the canvas)
delete-incorrectly-loads-image.mov
Video with solution: (deleted image does not get added to the canvas)
fixed.mov
Cheers,
Michael Dimmitt
The text was updated successfully, but these errors were encountered: