notes
This commit is contained in:
parent
29a251eac7
commit
f974552a79
2 changed files with 5 additions and 0 deletions
4
TODO.md
4
TODO.md
|
|
@ -7,6 +7,8 @@ loose doc to capture some ideas as i work
|
|||
|
||||
## Events
|
||||
|
||||
Would be good to wrap events in a nice interface, as well.
|
||||
|
||||
Blockly events are bad, as written. You can attach listeners to the workspace or to blocks, but they fire on every workspace event and you have to filter out all the ones you don't care about:
|
||||
```js
|
||||
block.addChangeListener(function({ blockId, type, name, element, newValue, oldValue }) {
|
||||
|
|
@ -26,3 +28,5 @@ listenFor({
|
|||
block: [aBlock, "block-type", blockFunc(block)]
|
||||
})
|
||||
````
|
||||
|
||||
Then we can do the filtering efficiently, in one spot, with tests, and expose a nice interface, or layers of interfaces (kitchen sink/low-level vs porcelain/higher-order-functions)
|
||||
|
|
|
|||
|
|
@ -138,6 +138,7 @@ export default {
|
|||
helpField.setValue(current)
|
||||
},
|
||||
|
||||
// a placeholder for the incoming preview data from live weatherkit requests
|
||||
currentWeatherByLocation: {},
|
||||
|
||||
CURRENT_PROPS: [
|
||||
|
|
|
|||
Loading…
Reference in a new issue