Commit c7ebb731 authored by suncy's avatar suncy
Browse files

bug: 设置class未判断节点是否被销毁

parent 34b28ae8
No related merge requests found
Showing with 8 additions and 5 deletions
+8 -5
......@@ -88,7 +88,7 @@ export class Element {
}
public add_class_start(): number {
return Module._add_class_start(this.document.uniqueID, this.uniqueID);
return Module._add_class_start(this.document.uniqueID, this.uniqueID)
}
public get display() {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
No preview for this file type
......@@ -1111,7 +1111,7 @@ const gui_debug = {
if(cfg.record) {
records.push({type:CmdType._set_border_image_slice, param: [node, u1, v1, u2, v2, fill]})
}
return gui1._set_border_image_slice(doc,node,u1,v1,u2,v2,fill);
return gui1._set_border_image_slice(doc,node,u1,v1,u2,v2,fill?1:0);
},
_set_border_image_clip: (doc: GUINode, node: GUINode, u1: f32, v1: f32, u2: f32, v2: f32) => {
if (!cfg.useLib) { return 0; }
......@@ -1425,7 +1425,7 @@ const gui_debug = {
if(cfg.record) {
records.push({type:CmdType._set_overflow, param: [node, data]})
}
return gui1._set_overflow(doc, node, data);
return gui1._set_overflow(doc, node, data?1:0);
},
_set_opacity: (doc: GUINode, node: GUINode, value: f32) => {
......@@ -1449,7 +1449,7 @@ const gui_debug = {
if(cfg.record) {
records.push({type:CmdType._set_visibility, param: [node, value]})
}
gui1._set_visibility(doc, node, value);
gui1._set_visibility(doc, node, value?1:0);
},
// ------------ container
......
......@@ -145,6 +145,9 @@ export class Painter implements Painter1{
*/
const mountPatch = (desc: Desc, preStyle: Object, node: VNode, isReplace: boolean) => {
let realNode = node.realNode;
if(realNode.isDestroy) {
return;
}
let oldClass = realNode.add_class_start();
mountPatch1(desc, preStyle, node.ext, 0, node.realNode, node, isReplace);
realNode.add_class_end(oldClass);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment