JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
boxes don't click/hover as if they're filled
authorJason Woofenden <jason@jasonwoof.com>
Sat, 7 Nov 2015 04:20:03 +0000 (23:20 -0500)
committerJason Woofenden <jason@jasonwoof.com>
Sat, 7 Nov 2015 04:20:03 +0000 (23:20 -0500)
main.coffee

index 0a60f32..8f20313 100644 (file)
@@ -238,8 +238,9 @@ class RectWidget extends Widget
                        new_prox *= new_prox
                        if new_prox < prox
                                prox = new_prox
                        new_prox *= new_prox
                        if new_prox < prox
                                prox = new_prox
-               if in_x and in_y and prox > PROX_MAX
-                       prox = PROX_MAX - 1
+               # "hit" anything inside
+               #if in_x and in_y and prox > PROX_MAX
+               #       prox = PROX_MAX - 1
                return prox
        resize: (wh) ->
                dw = wh.w - @width
                return prox
        resize: (wh) ->
                dw = wh.w - @width
@@ -451,7 +452,7 @@ init = ->
        supply_add PolylineWidget, y: 25, nodes: [{x: 0, y: 0}, {x: 50, y: 0}]
        supply_add PolylineWidget, x: 25, nodes: [{x: 0, y: 0}, {x: 0, y: 50}]
        supply_add PolylineWidget, x: 10, nodes: [{x: 0, y: 0}, {x: 15, y: 50}, {x: 30, y: 0}]
        supply_add PolylineWidget, y: 25, nodes: [{x: 0, y: 0}, {x: 50, y: 0}]
        supply_add PolylineWidget, x: 25, nodes: [{x: 0, y: 0}, {x: 0, y: 50}]
        supply_add PolylineWidget, x: 10, nodes: [{x: 0, y: 0}, {x: 15, y: 50}, {x: 30, y: 0}]
-       supply_add PolylineWidget, x: 0, nodes: [{x: 0, y: 50}, {x: 17, y: 0}, {x: 33, y: 50}, {x: 50, y: 0}]
+       supply_add PolylineWidget, nodes: [{x: 0, y: 50}, {x: 17, y: 0}, {x: 33, y: 50}, {x: 50, y: 0}]
 
        # editor state
        controls_layer = { all: {}, selected: {} }
 
        # editor state
        controls_layer = { all: {}, selected: {} }