Fix onPaint for widgets
This commit is contained in:
parent
ded91fab7d
commit
ba93bd1bc5
1 changed files with 9 additions and 0 deletions
|
|
@ -84,9 +84,18 @@ Pattern.prototype.onPaint = function (painter) {
|
||||||
state.controls.painters = [];
|
state.controls.painters = [];
|
||||||
}
|
}
|
||||||
state.controls.painters.push(painter);
|
state.controls.painters.push(painter);
|
||||||
|
return state;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// TODO - Why isn't this pure deep copy not working?
|
||||||
|
// Pattern.prototype.onPaint = function (painter) {
|
||||||
|
// return this.withState((state) => {
|
||||||
|
// const painters = state.controls.painters ? [...state.controls.painters, painter] : [painter];
|
||||||
|
// return new State(state.span, { ...state.controls, painters });
|
||||||
|
// });
|
||||||
|
// };
|
||||||
|
|
||||||
Pattern.prototype.getPainters = function () {
|
Pattern.prototype.getPainters = function () {
|
||||||
let painters = [];
|
let painters = [];
|
||||||
this.queryArc(0, 0, { painters });
|
this.queryArc(0, 0, { painters });
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue