Closed pixelzoom closed 4 years ago
Wow, this took a lot longer for me than it should have. I'm glad to have taken the time muddling through because I learned a fair amount. In the end, it was a simple rewrite to change the MovableDragHandler call to the DragListener. They are almost the same function (the "handler" doesn't seem to handle anything extra). Setting the useParentOffset: true for DragListener was important. In the end, the code is shorter and more consistent. I was also able get rid of ToolIconListener.js entirely.
Related to #1 (code review).
There are 4 warnings:
The first 3 are in PhET common code, and there's nothing that you can do about them. I've reported them in https://github.com/phetsims/sun/issues/599.
The last on is in XrayDiffractionScreenView.js, and I recommend addressing it. Deprecated code is code that has been replaced by a superior solution, is no longer supported, and will eventually be deleted. In this case, MovableDragHandler was an method of dragging things. DragListener (in the scenery repository) is its replacement. Let me know if you need assistance migrating from MovableDragHandler to DragListener.