Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attach drag behaviour to event rectangle #115

Merged
merged 9 commits into from
Feb 26, 2020
Merged

attach drag behaviour to event rectangle #115

merged 9 commits into from
Feb 26, 2020

Conversation

umarmohammed
Copy link
Member

@umarmohammed umarmohammed commented Feb 25, 2020

closes #114

@umarmohammed umarmohammed marked this pull request as ready for review February 26, 2020 20:01
};
}

private shiftDraggedTimelineEvent(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private shiftDraggedTimelineEvent(
private updateDraggedTimelineEvent(

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

repeat()
);

onDrag(eventRectangle: EventRectangle, event: any) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
onDrag(eventRectangle: EventRectangle, event: any) {
onDrag(eventRectangle: EventRectangle, event: EventRectangleDragEvent) {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


private setupDrag() {
if (this.eventRectangleEl) {
const onDrag = drag()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find, although I'm not sure that it will simplify the code.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've created an issue to investigate #118

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah not sure either, could be worth keeping it in mind. I used it for a Titan related POC to hook into the map events (I think).

scan(
(acc, curr) =>
curr ? { ...curr, dy: acc.dy + curr.dy, dx: acc.dx + curr.dx } : acc,
{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could declutter this observable/scan by declaring the initial value in its own variable ie:

const dragSeed = {
  dx: 0,
  dy: 0,
  id: null
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

…line into 114-attach-drag-behaviour-to-event-rectangle
@umarmohammed umarmohammed merged commit 80ea1c0 into rxtime:master Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

attach drag behaviour to event rectangle
3 participants