Frontmatter
| id | 1504 |
| title | draggable.DragZone: onAfterDragStart() |
| state | Closed |
| labels | enhancementhelp wantedgood first issuestale |
| assignees | [] |
| createdAt | Feb 2, 2021, 1:59 PM |
| updatedAt | Sep 19, 2024, 4:30 AM |
| githubUrl | https://github.com/neomjs/neo/issues/1504 |
| author | tobiu |
| commentsCount | 2 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Sep 19, 2024, 4:30 AM |
Flagging this issue as "good first issue" & "help wanted", since it is an easy one.
Move the logic inside the promise callback of dragStart() into a new method.
Neo.main.DomAccess.getBoundingClientRect({ id: me.getDragElementRoot().id }).then(rect => { offsetX = data.clientX - rect.left; offsetY = data.clientY - rect.top; Object.assign(me, { dragElementRect: rect, offsetX : offsetX, offsetY : offsetY }); me.createDragProxy(rect); me.fire('dragStart', { dragElementRect: rect, id : me.id, offsetX : offsetX, offsetY : offsetY }); });draggable.calendar.WeekEventDragZone can then use it to fire the dragStart event.