Skip to content

Commit d230cac

Browse files
authored
fixing + cleaning + improved editing/composition/decomposition
1 parent 4403d7c commit d230cac

File tree

150 files changed

+6835
-3781
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+6835
-3781
lines changed

.eslintrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
"plugin:@typescript-eslint/recommended",
99
"prettier"
1010
],
11+
"ignorePatterns": ["src/script/**/*.ts", "src/**/_*.ts"],
1112
"rules": {
12-
"no-console": 0, // warning
13+
"no-console": "error",
1314
"no-constant-condition": "off",
1415
"prettier/prettier": 0, // error
1516
"no-async-promise-executor": "off",
@@ -19,6 +20,7 @@
1920
"no-empty": "off",
2021
"import/no-duplicates": "error",
2122
"prefer-const": "off",
23+
"prefer-rest-params": "off",
2224
"no-useless-catch": "off",
2325
"no-prototype-builtins": "off",
2426
"no-misleading-character-class": "off",

src/Class/Element/index.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
unregisterParentRoot,
1717
unregisterRoot,
1818
} from '../../component/method'
19+
import { MethodNotImplementedError } from '../../exception/MethodNotImplementedError'
1920
import { System } from '../../system'
2021
import { Dict } from '../../types/Dict'
2122
import { C_EE } from '../../types/interface/C'
@@ -73,10 +74,15 @@ export class Element_<
7374
this.addListener('play', this._play)
7475
this.addListener('pause', this._pause)
7576
this.addListener('set', (name: keyof I, data) => {
76-
if (!this._forwarding) {
77+
if (!this._forwarding && data !== undefined) {
7778
this._backwarding = true
78-
this._input?.[name]?.pull()
79-
this._backwarding = false
79+
80+
// TODO add to end of event queue
81+
setTimeout(() => {
82+
this._input?.[name]?.pull()
83+
84+
this._backwarding = false
85+
}, 0)
8086
}
8187

8288
this._forwarding = true
@@ -95,7 +101,7 @@ export class Element_<
95101
}
96102
}
97103
getBundleSpec(): UnitBundleSpec {
98-
throw new Error('Method not implemented.')
104+
throw new MethodNotImplementedError()
99105
}
100106

101107
registerRoot(component: Component_): void {
@@ -138,7 +144,7 @@ export class Element_<
138144
Bundle: UnitBundle<Component_<ComponentEvents>>,
139145
at: number
140146
): void {
141-
throw new Error('Method not implemented.')
147+
throw new MethodNotImplementedError()
142148
}
143149

144150
pushChild(Bundle: UnitBundle<Component_>): number {
@@ -172,7 +178,7 @@ export class Element_<
172178
return slot
173179
}
174180

175-
throw new Error('Slot not found')
181+
throw new MethodNotImplementedError()
176182
}
177183

178184
private _play(): void {

0 commit comments

Comments
 (0)