Created
March 1, 2018 17:25
-
-
Save TheBizzle/b76fca8e0d6009adf503d473bfd64447 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app/assets/javascripts/beak/widgets/event-traffic-control.coffee b/app/assets/javascripts/beak/widgets/event-traffic-control.coffee | |
| index b80aed6..3131c38 100644 | |
| --- a/app/assets/javascripts/beak/widgets/event-traffic-control.coffee | |
| +++ b/app/assets/javascripts/beak/widgets/event-traffic-control.coffee | |
| @@ -116,6 +116,13 @@ window.controlEventTraffic = (controller) -> | |
| ractive.set('hasFocus', document.activeElement is node) | |
| return | |
| + # (_, Number, Boolean) => Unit | |
| + unregisterWidget = (_, id, wasNew) -> | |
| + controller.removeWidgetById(id, wasNew) | |
| + onWidgetRightChange() | |
| + onWidgetBottomChange() | |
| + return | |
| + | |
| # () => Unit | |
| updateTopology = -> | |
| { wrappingallowedinx: wrapX, wrappingallowediny: wrapY } = viewController.model.world | |
| @@ -135,6 +142,7 @@ window.controlEventTraffic = (controller) -> | |
| ractive.on('toggle-interface-lock', toggleInterfaceLock) | |
| ractive.on('*.redraw-view' , redrawView) | |
| ractive.on('*.resize-view' , resizeView) | |
| + ractive.on('*.unregister-widget' , unregisterWidget) | |
| ractive.on('*.update-topology' , updateTopology) | |
| ractive.on('check-action-keys' , (_, event) -> checkActionKeys(event)) | |
| @@ -145,7 +153,6 @@ window.controlEventTraffic = (controller) -> | |
| ractive.on('*.reject-duplicate-var' , (_, varName) -> rejectDupe(varName)) | |
| ractive.on('*.rename-interface-global', (_, oldN, newN, x) -> renameGlobal(oldN, newN, x)) | |
| ractive.on('*.set-patch-size' , (_, patchSize) -> setPatchSize(patchSize)) | |
| - ractive.on('*.unregister-widget' , (_, id, wasNew) -> controller.removeWidgetById(id, wasNew)) | |
| ractive.on('*.update-widgets' , -> controller.updateWidgets()) | |
| return | |
| diff --git a/test/assets/javascripts/TortoiseJS/control/TortoiseTest.coffee b/test/assets/javascripts/beak/TortoiseTest.coffee | |
| similarity index 100% | |
| rename from test/assets/javascripts/TortoiseJS/control/TortoiseTest.coffee | |
| rename to test/assets/javascripts/beak/TortoiseTest.coffee |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment