Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/mark point confine #871

Merged
merged 11 commits into from
Jan 9, 2024
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender-components",
"comment": "fix(marker): fix problem of no render when set visible attr. fix@Visactor/Vchart#1901",
"type": "none"
}
],
"packageName": "@visactor/vrender-components"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender-components",
"comment": "feat(marker): mark point support confine. fix @Visactor/VChart#1573",
"type": "none"
}
],
"packageName": "@visactor/vrender-components"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender-components",
"comment": "fix(datazoom): adaptive handler text layout. fix@Visactor/VChart#1809",
"type": "none"
}
],
"packageName": "@visactor/vrender-components"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender-components",
"comment": "fix(datazoom): set pickable false when zoomLock. fix @Visactor/VChart#1565",
"type": "none"
}
],
"packageName": "@visactor/vrender-components"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender-components",
"comment": "fix(datazoom): handler not follow mouse after resize. fix@Visactor/Vchart#1490",
"type": "none"
}
],
"packageName": "@visactor/vrender-components"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export function run() {
itemRefX: 10,
itemRefY: 0,
itemRefAngle: 0,
decorativeLineVisible: false
decorativeLineVisible: false,
visible: true
};

const styleAttr = {
Expand All @@ -34,6 +35,7 @@ export function run() {
refX: guiObject.itemRefX,
refY: guiObject.itemRefY,
refAngle: guiObject.itemRefAngle,
confine: true,
textStyle: {
// text: 'mark point label text'
type: 'rich',
Expand Down Expand Up @@ -108,6 +110,7 @@ export function run() {
image: `${window.location.origin}/__tests__/browser/sources/shape_logo.png`
}
},
visible: guiObject.visible,
clipInRange: false
// limitRect: {
// x: 50,
Expand Down Expand Up @@ -195,6 +198,9 @@ export function run() {
})
);
});
gui.add(guiObject, 'visible').onChange(value => {
markPoints.forEach(markPoint => markPoint.setAttribute('visible', value, true));
});

gui.add(guiObject, 'itemOffsetX').onChange(value => {
markPoints.forEach(markPoint =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ describe('Marker', () => {
expect((markPointContainer.children[0] as unknown as Segment).startSymbol?.attribute.y).toBe(250);

// tag构造的label
expect((markPointContainer.children[2] as unknown as Tag).attribute.x).toBeCloseTo(209.5782628522115);
expect((markPointContainer.children[2] as unknown as Tag).attribute.y).toBeCloseTo(282.87347885566345);
expect((markPointContainer.children[2] as unknown as Tag).attribute.x).toBeCloseTo(210);
expect((markPointContainer.children[2] as unknown as Tag).attribute.y).toBeCloseTo(280);
expect(
((markPointContainer.children[2] as unknown as Tag).getChildByName('tag-content') as any).children[0].attribute
.text
Expand Down
Loading
Loading