massive Shape rework: keep both tvPoints/Props and ourPoints/Props; delegate model updates to subclasses; DCA/VLine working but Ladder/HLine not done.

This commit is contained in:
Tim
2024-04-16 16:25:31 -04:00
parent 8befffe1c5
commit 65be28fb0a
11 changed files with 874 additions and 208 deletions

View File

@@ -3,7 +3,7 @@ export function mixin(child, ...parents) {
// assigned by parents order, highest priority first
for( const parent of parents ) {
for ( const key in parent) {
if (parent.hasOwnProperty(key) && !child.hasOwnProperty(key)) {
if (parent.hasOwnProperty(key) && !child.hasOwnProperty(key) && parent[key] !== undefined) {
child[key] = parent[key];
}
}
@@ -11,7 +11,6 @@ export function mixin(child, ...parents) {
return child;
}
export function prototype(parent, child) {
const result = Object.create(parent);
Object.assign(result, child)