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

Step Element Target Action #996

Merged

Conversation

WORMSS
Copy link
Contributor

@WORMSS WORMSS commented Jun 3, 2020

Hey @rwwagner90 Sorry, I have been some time, I have had family duties and also it seems I am being super dumb so it's really slowing me down.

I have never tried to do advanced things with JSdocs, so I am failing to see how I can nicely add the 'this' context to JSDocs.. I am more a typescript person who has dabbled with JSDocs in the past..
So I have utterly failed to see how to assign the context without making it look like a function argument, so.. I left it as is. (Sorry)

The second thing I have been struggling with is double checking on what getTarget() could return..

I was destroying my brain going around in circles over and over going down dead ends and all sorts trying to find where this.target was assigned in step.js..

And then I finally found step.target in general.js and parseAttachTo

Added getElement to Step class and typescript definition
Added getTarget to Step class and typescript definition
Added 'this' context to Action callback typescript definition

Though, I thought it best to note, it is technically possible to get SVGElements back and not just HTMLElements.. We have some Typescripting in our own projects that deal with that, but with how limiting it is with JSDocs already, I thought best to try and keep it simple and not defer too far from the JSDocs in the typescript definition.

Added getElement to Step class
Added getTarget to Step class
Added this context to Action callback typescript definition
@WORMSS
Copy link
Contributor Author

WORMSS commented Jun 8, 2020

@rwwagner90 did I do something wrong with my PR?

@RobbieTheWagner
Copy link
Member

@WORMSS no everything looks good! Sorry I just wanted to double check where the target was set, and I think we are okay here.

@RobbieTheWagner RobbieTheWagner merged commit 954124e into shipshapecode:master Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants