@visactor/vrender-components 0.16.9-alpha.0 → 0.16.9-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/axis/overlap/auto-hide.js +2 -2
- package/cjs/axis/overlap/auto-hide.js.map +1 -1
- package/cjs/checkbox/checkbox.d.ts +2 -1
- package/cjs/checkbox/checkbox.js +23 -9
- package/cjs/checkbox/checkbox.js.map +1 -1
- package/cjs/checkbox/type.d.ts +5 -1
- package/cjs/checkbox/type.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/marker/base.js +6 -9
- package/cjs/marker/base.js.map +1 -1
- package/cjs/marker/line.js +1 -2
- package/cjs/marker/line.js.map +1 -1
- package/cjs/marker/point.js +1 -2
- package/cjs/marker/point.js.map +1 -1
- package/dist/index.js +42 -21
- package/dist/index.min.js +1 -1
- package/es/axis/overlap/auto-hide.js +2 -1
- package/es/axis/overlap/auto-hide.js.map +1 -1
- package/es/checkbox/checkbox.d.ts +2 -1
- package/es/checkbox/checkbox.js +22 -8
- package/es/checkbox/checkbox.js.map +1 -1
- package/es/checkbox/type.d.ts +5 -1
- package/es/checkbox/type.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/marker/base.js +6 -9
- package/es/marker/base.js.map +1 -1
- package/es/marker/line.js +1 -2
- package/es/marker/line.js.map +1 -1
- package/es/marker/point.js +1 -2
- package/es/marker/point.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -24341,6 +24341,7 @@
|
|
|
24341
24341
|
if (items.length > 1) {
|
|
24342
24342
|
vutils.last(items).setAttribute('opacity', 0);
|
|
24343
24343
|
}
|
|
24344
|
+
vutils.last(source).setAttribute('opacity', 1);
|
|
24344
24345
|
}
|
|
24345
24346
|
}
|
|
24346
24347
|
source.forEach(item => {
|
|
@@ -26579,8 +26580,7 @@
|
|
|
26579
26580
|
const groupClip = createGroup(Object.assign(Object.assign({}, limitRect), { clip: true, pickable: false }));
|
|
26580
26581
|
group = createGroup({
|
|
26581
26582
|
x: -((_a = limitRect === null || limitRect === void 0 ? void 0 : limitRect.x) !== null && _a !== void 0 ? _a : 0),
|
|
26582
|
-
y: -((_b = limitRect === null || limitRect === void 0 ? void 0 : limitRect.y) !== null && _b !== void 0 ? _b : 0)
|
|
26583
|
-
pickable: false
|
|
26583
|
+
y: -((_b = limitRect === null || limitRect === void 0 ? void 0 : limitRect.y) !== null && _b !== void 0 ? _b : 0)
|
|
26584
26584
|
});
|
|
26585
26585
|
groupClip.add(group);
|
|
26586
26586
|
this._containerClip = groupClip;
|
|
@@ -26589,8 +26589,7 @@
|
|
|
26589
26589
|
else {
|
|
26590
26590
|
group = createGroup({
|
|
26591
26591
|
x: 0,
|
|
26592
|
-
y: 0
|
|
26593
|
-
pickable: false
|
|
26592
|
+
y: 0
|
|
26594
26593
|
});
|
|
26595
26594
|
this.add(group);
|
|
26596
26595
|
}
|
|
@@ -26607,10 +26606,11 @@
|
|
|
26607
26606
|
});
|
|
26608
26607
|
}
|
|
26609
26608
|
render() {
|
|
26610
|
-
var _a;
|
|
26611
|
-
this.setAttribute('pickable', false);
|
|
26609
|
+
var _a, _b;
|
|
26612
26610
|
const markerVisible = (_a = this.attribute.visible) !== null && _a !== void 0 ? _a : true;
|
|
26613
|
-
|
|
26611
|
+
const markerInteractive = (_b = this.attribute.interactive) !== null && _b !== void 0 ? _b : false;
|
|
26612
|
+
if (!markerInteractive) {
|
|
26613
|
+
this.setAttribute('pickable', false);
|
|
26614
26614
|
this.setAttribute('childrenPickable', false);
|
|
26615
26615
|
}
|
|
26616
26616
|
if (markerVisible) {
|
|
@@ -26934,8 +26934,7 @@
|
|
|
26934
26934
|
endSymbol,
|
|
26935
26935
|
lineStyle,
|
|
26936
26936
|
mainSegmentIndex,
|
|
26937
|
-
multiSegment
|
|
26938
|
-
pickable: false
|
|
26937
|
+
multiSegment
|
|
26939
26938
|
});
|
|
26940
26939
|
line.name = 'mark-line-line';
|
|
26941
26940
|
this._line = line;
|
|
@@ -27212,8 +27211,7 @@
|
|
|
27212
27211
|
y: position.y + ((itemContent === null || itemContent === void 0 ? void 0 : itemContent.offsetY) || 0)
|
|
27213
27212
|
};
|
|
27214
27213
|
const line = new Segment({
|
|
27215
|
-
points: []
|
|
27216
|
-
pickable: false
|
|
27214
|
+
points: []
|
|
27217
27215
|
});
|
|
27218
27216
|
line.name = 'mark-point-line';
|
|
27219
27217
|
this._line = line;
|
|
@@ -31048,7 +31046,8 @@
|
|
|
31048
31046
|
return new Tag(params ? params.attribute : {});
|
|
31049
31047
|
}
|
|
31050
31048
|
|
|
31051
|
-
const
|
|
31049
|
+
const checkSvg = '<svg width="200" height="200" viewBox="0 0 1024 1024" fill="#fff" xmlns="http://www.w3.org/2000/svg"><path d="M877.44815445 206.10060629a64.72691371 64.72691371 0 0 0-95.14856334 4.01306852L380.73381888 685.46812814 235.22771741 533.48933518a64.72691371 64.72691371 0 0 0-92.43003222-1.03563036l-45.82665557 45.82665443a64.72691371 64.72691371 0 0 0-0.90617629 90.61767965l239.61903446 250.10479331a64.72691371 64.72691371 0 0 0 71.19960405 15.14609778 64.33855261 64.33855261 0 0 0 35.08198741-21.23042702l36.24707186-42.71976334 40.5190474-40.77795556-3.36579926-3.49525333 411.40426297-486.74638962a64.72691371 64.72691371 0 0 0-3.88361443-87.64024149l-45.3088404-45.43829334z"></path></svg>';
|
|
31050
|
+
const indeterminateSvg = '<svg width="200" height="200" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="5" d="M5 12h14"/></svg>';
|
|
31052
31051
|
class CheckBox extends AbstractComponent {
|
|
31053
31052
|
constructor(attributes) {
|
|
31054
31053
|
super(vutils.merge({}, CheckBox.defaultAttributes, attributes));
|
|
@@ -31073,13 +31072,14 @@
|
|
|
31073
31072
|
}
|
|
31074
31073
|
renderBox() {
|
|
31075
31074
|
this._box = new Rect(vutils.merge({}, this.attribute.box));
|
|
31076
|
-
|
|
31075
|
+
const isCheckedOrIndeterminate = this.attribute.checked || this.attribute.indeterminate;
|
|
31076
|
+
if (isCheckedOrIndeterminate && this.attribute.disabled) {
|
|
31077
31077
|
this._box.setAttributes({
|
|
31078
31078
|
fill: this.attribute.box.disableCheckedFill,
|
|
31079
31079
|
stroke: this.attribute.box.disableCheckedStroke
|
|
31080
31080
|
});
|
|
31081
31081
|
}
|
|
31082
|
-
else if (
|
|
31082
|
+
else if (isCheckedOrIndeterminate) {
|
|
31083
31083
|
this._box.setAttributes({
|
|
31084
31084
|
fill: this.attribute.box.checkedFill,
|
|
31085
31085
|
stroke: this.attribute.box.checkedStroke
|
|
@@ -31088,11 +31088,24 @@
|
|
|
31088
31088
|
this.appendChild(this._box);
|
|
31089
31089
|
}
|
|
31090
31090
|
renderIcon() {
|
|
31091
|
-
this.
|
|
31092
|
-
|
|
31093
|
-
|
|
31091
|
+
this._checkIcon = new Image(vutils.merge({ image: this.attribute.icon.checkIconImage }, this.attribute.icon));
|
|
31092
|
+
this.appendChild(this._checkIcon);
|
|
31093
|
+
this._indeterminateIcon = new Image(vutils.merge({
|
|
31094
|
+
image: this.attribute.icon.indeterminateIconImage
|
|
31095
|
+
}, this.attribute.icon));
|
|
31096
|
+
this.appendChild(this._indeterminateIcon);
|
|
31097
|
+
if (this.attribute.checked) {
|
|
31098
|
+
this._checkIcon.setAttribute('visible', true);
|
|
31099
|
+
this._indeterminateIcon.setAttribute('visible', false);
|
|
31100
|
+
}
|
|
31101
|
+
else if (this.attribute.indeterminate) {
|
|
31102
|
+
this._checkIcon.setAttribute('visible', false);
|
|
31103
|
+
this._indeterminateIcon.setAttribute('visible', true);
|
|
31104
|
+
}
|
|
31105
|
+
else {
|
|
31106
|
+
this._checkIcon.setAttribute('visible', false);
|
|
31107
|
+
this._indeterminateIcon.setAttribute('visible', false);
|
|
31094
31108
|
}
|
|
31095
|
-
this.appendChild(this._icon);
|
|
31096
31109
|
}
|
|
31097
31110
|
renderText() {
|
|
31098
31111
|
this._text = new WrapText(vutils.merge({}, this.attribute.text));
|
|
@@ -31127,7 +31140,11 @@
|
|
|
31127
31140
|
x: boxX,
|
|
31128
31141
|
y: boxY
|
|
31129
31142
|
});
|
|
31130
|
-
this.
|
|
31143
|
+
this._checkIcon.setAttributes({
|
|
31144
|
+
x: iconX,
|
|
31145
|
+
y: iconY
|
|
31146
|
+
});
|
|
31147
|
+
this._indeterminateIcon.setAttributes({
|
|
31131
31148
|
x: iconX,
|
|
31132
31149
|
y: iconY
|
|
31133
31150
|
});
|
|
@@ -31143,9 +31160,11 @@
|
|
|
31143
31160
|
}
|
|
31144
31161
|
else if (this.attribute.checked) {
|
|
31145
31162
|
this.setAttribute('checked', false);
|
|
31163
|
+
this.setAttribute('indeterminate', false);
|
|
31146
31164
|
}
|
|
31147
31165
|
else {
|
|
31148
31166
|
this.setAttribute('checked', true);
|
|
31167
|
+
this.setAttribute('indeterminate', false);
|
|
31149
31168
|
}
|
|
31150
31169
|
const changeEvent = new CustomEvent('checkbox_state_change', {
|
|
31151
31170
|
eventType: 'checkbox_state_change',
|
|
@@ -31159,6 +31178,7 @@
|
|
|
31159
31178
|
interactive: true,
|
|
31160
31179
|
disabled: false,
|
|
31161
31180
|
checked: false,
|
|
31181
|
+
indeterminate: false,
|
|
31162
31182
|
cursor: 'pointer',
|
|
31163
31183
|
disableCursor: 'not-allowed',
|
|
31164
31184
|
spaceBetweenTextAndIcon: 8,
|
|
@@ -31171,7 +31191,8 @@
|
|
|
31171
31191
|
pickable: false
|
|
31172
31192
|
},
|
|
31173
31193
|
icon: {
|
|
31174
|
-
|
|
31194
|
+
checkIconImage: checkSvg,
|
|
31195
|
+
indeterminateIconImage: indeterminateSvg,
|
|
31175
31196
|
width: 10,
|
|
31176
31197
|
height: 10,
|
|
31177
31198
|
pickable: false
|
|
@@ -31191,7 +31212,7 @@
|
|
|
31191
31212
|
}
|
|
31192
31213
|
};
|
|
31193
31214
|
|
|
31194
|
-
const version = "0.16.9-alpha.
|
|
31215
|
+
const version = "0.16.9-alpha.1";
|
|
31195
31216
|
|
|
31196
31217
|
exports.AbstractComponent = AbstractComponent;
|
|
31197
31218
|
exports.ArcInfo = ArcInfo;
|