|
@@ -39,7 +39,19 @@ export const updatePen = (pen: any, prop: string, render = true) => {
|
|
|
v.whiteSpace = 'nowrap';
|
|
|
pen.whiteSpace = 'nowrap';
|
|
|
}
|
|
|
- }
|
|
|
+ } else if(prop === 'btnWidth'){
|
|
|
+ if (pen.direction == 'vertical') {
|
|
|
+ v.width = ((pen.btnWidth || 100) + (pen.gap || 8) * 2);
|
|
|
+ } else {
|
|
|
+ v.width = (pen.btnWidth || 100) * pen.data.length + (pen.gap || 8) * (pen.data.length + 1);
|
|
|
+ }
|
|
|
+ } else if(prop === 'btnHeight'){
|
|
|
+ if (pen.direction == 'vertical') {
|
|
|
+ v.height = (pen.btnHeight || 32) * pen.data.length + (pen.gap || 8) * (pen.data.length + 1);
|
|
|
+ } else {
|
|
|
+ v.height = (pen.btnHeight || 32) + (pen.gap || 8) * 2;
|
|
|
+ }
|
|
|
+ }
|
|
|
meta2d.setValue(v, { render });
|
|
|
};
|
|
|
|