Skip to content

Commit

Permalink
feat: swap 'mouse' events to 'pointer' events for mobile compatibilit…
Browse files Browse the repository at this point in the history
…y; update site and docs (#9089)
  • Loading branch information
alliefeldman authored Oct 4, 2023
1 parent 9930d29 commit fa97659
Show file tree
Hide file tree
Showing 156 changed files with 1,490 additions and 1,427 deletions.
4 changes: 2 additions & 2 deletions build/vega-lite-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -12499,7 +12499,7 @@
"description": "With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\n\nOne of:\n- `\"global\"` -- only one brush exists for the entire SPLOM. When the user begins to drag, any previous brushes are cleared, and a new one is constructed.\n- `\"union\"` -- each cell contains its own brush, and points are highlighted if they lie within _any_ of these individual brushes.\n- `\"intersect\"` -- each cell contains its own brush, and points are highlighted only if they fall within _all_ of these individual brushes.\n\n__Default value:__ `global`.\n\n__See also:__ [`resolve` examples](https://vega.github.io/vega-lite/docs/selection.html#resolve) in the documentation."
},
"translate": {
"description": "When truthy, allows a user to interactively move an interval selection back-and-forth. Can be `true`, `false` (to disable panning), or a [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/) which must include a start and end event to trigger continuous panning. Discrete panning (e.g., pressing the left/right arrow keys) will be supported in future versions.\n\n__Default value:__ `true`, which corresponds to `[mousedown, window:mouseup] > window:mousemove!`. This default allows users to clicks and drags within an interval selection to reposition it.\n\n__See also:__ [`translate` examples](https://vega.github.io/vega-lite/docs/selection.html#translate) in the documentation.",
"description": "When truthy, allows a user to interactively move an interval selection back-and-forth. Can be `true`, `false` (to disable panning), or a [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/) which must include a start and end event to trigger continuous panning. Discrete panning (e.g., pressing the left/right arrow keys) will be supported in future versions.\n\n__Default value:__ `true`, which corresponds to `[pointerdown, window:pointerup] > window:pointermove!`. This default allows users to clicks and drags within an interval selection to reposition it.\n\n__See also:__ [`translate` examples](https://vega.github.io/vega-lite/docs/selection.html#translate) in the documentation.",
"type": [
"string",
"boolean"
Expand Down Expand Up @@ -12574,7 +12574,7 @@
"description": "With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\n\nOne of:\n- `\"global\"` -- only one brush exists for the entire SPLOM. When the user begins to drag, any previous brushes are cleared, and a new one is constructed.\n- `\"union\"` -- each cell contains its own brush, and points are highlighted if they lie within _any_ of these individual brushes.\n- `\"intersect\"` -- each cell contains its own brush, and points are highlighted only if they fall within _all_ of these individual brushes.\n\n__Default value:__ `global`.\n\n__See also:__ [`resolve` examples](https://vega.github.io/vega-lite/docs/selection.html#resolve) in the documentation."
},
"translate": {
"description": "When truthy, allows a user to interactively move an interval selection back-and-forth. Can be `true`, `false` (to disable panning), or a [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/) which must include a start and end event to trigger continuous panning. Discrete panning (e.g., pressing the left/right arrow keys) will be supported in future versions.\n\n__Default value:__ `true`, which corresponds to `[mousedown, window:mouseup] > window:mousemove!`. This default allows users to clicks and drags within an interval selection to reposition it.\n\n__See also:__ [`translate` examples](https://vega.github.io/vega-lite/docs/selection.html#translate) in the documentation.",
"description": "When truthy, allows a user to interactively move an interval selection back-and-forth. Can be `true`, `false` (to disable panning), or a [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/) which must include a start and end event to trigger continuous panning. Discrete panning (e.g., pressing the left/right arrow keys) will be supported in future versions.\n\n__Default value:__ `true`, which corresponds to `[pointerdown, window:pointerup] > window:pointermove!`. This default allows users to clicks and drags within an interval selection to reposition it.\n\n__See also:__ [`translate` examples](https://vega.github.io/vega-lite/docs/selection.html#translate) in the documentation.",
"type": [
"string",
"boolean"
Expand Down
6 changes: 3 additions & 3 deletions examples/compiled/airport_connections.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"name": "unit",
"value": {},
"on": [
{"events": "mousemove", "update": "isTuple(group()) ? group() : unit"}
{"events": "pointermove", "update": "isTuple(group()) ? group() : unit"}
]
},
{
Expand All @@ -135,7 +135,7 @@
"events": [
{
"source": "scope",
"type": "mouseover",
"type": "pointerover",
"markname": "layer_2_voronoi"
}
],
Expand All @@ -154,7 +154,7 @@
"events": [
{
"source": "scope",
"type": "mouseover",
"type": "pointerover",
"markname": "layer_2_voronoi"
}
],
Expand Down
18 changes: 9 additions & 9 deletions examples/compiled/bar_count_minimap.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"name": "unit",
"value": {},
"on": [
{"events": "mousemove", "update": "isTuple(group()) ? group() : unit"}
{"events": "pointermove", "update": "isTuple(group()) ? group() : unit"}
]
},
{
Expand Down Expand Up @@ -149,7 +149,7 @@
{
"events": {
"source": "scope",
"type": "mousedown",
"type": "pointerdown",
"filter": [
"!event.item || event.item.mark.name !== \"brush_brush\""
]
Expand All @@ -159,17 +159,17 @@
{
"events": {
"source": "window",
"type": "mousemove",
"type": "pointermove",
"consume": true,
"between": [
{
"source": "scope",
"type": "mousedown",
"type": "pointerdown",
"filter": [
"!event.item || event.item.mark.name !== \"brush_brush\""
]
},
{"source": "window", "type": "mouseup"}
{"source": "window", "type": "pointerup"}
]
},
"update": "[brush_y[0], clamp(y(unit), 0, concat_1_height)]"
Expand Down Expand Up @@ -229,7 +229,7 @@
"events": [
{
"source": "scope",
"type": "mousedown",
"type": "pointerdown",
"markname": "brush_brush"
}
],
Expand All @@ -245,15 +245,15 @@
"events": [
{
"source": "window",
"type": "mousemove",
"type": "pointermove",
"consume": true,
"between": [
{
"source": "scope",
"type": "mousedown",
"type": "pointerdown",
"markname": "brush_brush"
},
{"source": "window", "type": "mouseup"}
{"source": "window", "type": "pointerup"}
]
}
],
Expand Down
26 changes: 13 additions & 13 deletions examples/compiled/brush_table.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"name": "unit",
"value": {},
"on": [
{"events": "mousemove", "update": "isTuple(group()) ? group() : unit"}
{"events": "pointermove", "update": "isTuple(group()) ? group() : unit"}
]
},
{
Expand Down Expand Up @@ -101,7 +101,7 @@
{
"events": {
"source": "scope",
"type": "mousedown",
"type": "pointerdown",
"filter": [
"!event.item || event.item.mark.name !== \"brush_brush\""
]
Expand All @@ -111,17 +111,17 @@
{
"events": {
"source": "window",
"type": "mousemove",
"type": "pointermove",
"consume": true,
"between": [
{
"source": "scope",
"type": "mousedown",
"type": "pointerdown",
"filter": [
"!event.item || event.item.mark.name !== \"brush_brush\""
]
},
{"source": "window", "type": "mouseup"}
{"source": "window", "type": "pointerup"}
]
},
"update": "[brush_x[0], clamp(x(unit), 0, concat_0_width)]"
Expand Down Expand Up @@ -160,7 +160,7 @@
{
"events": {
"source": "scope",
"type": "mousedown",
"type": "pointerdown",
"filter": [
"!event.item || event.item.mark.name !== \"brush_brush\""
]
Expand All @@ -170,17 +170,17 @@
{
"events": {
"source": "window",
"type": "mousemove",
"type": "pointermove",
"consume": true,
"between": [
{
"source": "scope",
"type": "mousedown",
"type": "pointerdown",
"filter": [
"!event.item || event.item.mark.name !== \"brush_brush\""
]
},
{"source": "window", "type": "mouseup"}
{"source": "window", "type": "pointerup"}
]
},
"update": "[brush_y[0], clamp(y(unit), 0, concat_0_height)]"
Expand Down Expand Up @@ -248,7 +248,7 @@
"events": [
{
"source": "scope",
"type": "mousedown",
"type": "pointerdown",
"markname": "brush_brush"
}
],
Expand All @@ -264,15 +264,15 @@
"events": [
{
"source": "window",
"type": "mousemove",
"type": "pointermove",
"consume": true,
"between": [
{
"source": "scope",
"type": "mousedown",
"type": "pointerdown",
"markname": "brush_brush"
},
{"source": "window", "type": "mouseup"}
{"source": "window", "type": "pointerup"}
]
}
],
Expand Down
10 changes: 5 additions & 5 deletions examples/compiled/circle_bubble_health_income.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"name": "unit",
"value": {},
"on": [
{"events": "mousemove", "update": "isTuple(group()) ? group() : unit"}
{"events": "pointermove", "update": "isTuple(group()) ? group() : unit"}
]
},
{"name": "view", "update": "vlSelectionResolve(\"view_store\", \"union\")"},
Expand Down Expand Up @@ -78,7 +78,7 @@
"value": {},
"on": [
{
"events": [{"source": "scope", "type": "mousedown"}],
"events": [{"source": "scope", "type": "pointerdown"}],
"update": "{x: x(unit), y: y(unit), extent_x: domain(\"x\"), extent_y: domain(\"y\")}"
}
]
Expand All @@ -91,11 +91,11 @@
"events": [
{
"source": "window",
"type": "mousemove",
"type": "pointermove",
"consume": true,
"between": [
{"source": "scope", "type": "mousedown"},
{"source": "window", "type": "mouseup"}
{"source": "scope", "type": "pointerdown"},
{"source": "window", "type": "pointerup"}
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion examples/compiled/concat_bar_layer_circle.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"name": "unit",
"value": {},
"on": [
{"events": "mousemove", "update": "isTuple(group()) ? group() : unit"}
{"events": "pointermove", "update": "isTuple(group()) ? group() : unit"}
]
},
{
Expand Down
10 changes: 5 additions & 5 deletions examples/compiled/concat_hover.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"name": "unit",
"value": {},
"on": [
{"events": "mousemove", "update": "isTuple(group()) ? group() : unit"}
{"events": "pointermove", "update": "isTuple(group()) ? group() : unit"}
]
},
{
Expand All @@ -67,7 +67,7 @@
"name": "hover_tuple",
"on": [
{
"events": [{"source": "scope", "type": "mouseover"}],
"events": [{"source": "scope", "type": "pointerover"}],
"update": "datum && item().mark.marktype !== 'group' && indexof(item().mark.role, 'legend') < 0 ? {unit: \"concat_0\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null",
"force": true
},
Expand All @@ -82,7 +82,7 @@
"value": false,
"on": [
{
"events": [{"source": "scope", "type": "mouseover"}],
"events": [{"source": "scope", "type": "pointerover"}],
"update": "event.shiftKey"
},
{
Expand Down Expand Up @@ -195,7 +195,7 @@
"name": "hover_tuple",
"on": [
{
"events": [{"source": "scope", "type": "mouseover"}],
"events": [{"source": "scope", "type": "pointerover"}],
"update": "datum && item().mark.marktype !== 'group' && indexof(item().mark.role, 'legend') < 0 ? {unit: \"concat_1\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null",
"force": true
},
Expand All @@ -210,7 +210,7 @@
"value": false,
"on": [
{
"events": [{"source": "scope", "type": "mouseover"}],
"events": [{"source": "scope", "type": "pointerover"}],
"update": "event.shiftKey"
},
{
Expand Down
10 changes: 5 additions & 5 deletions examples/compiled/concat_hover_filter.vg.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"name": "unit",
"value": {},
"on": [
{"events": "mousemove", "update": "isTuple(group()) ? group() : unit"}
{"events": "pointermove", "update": "isTuple(group()) ? group() : unit"}
]
},
{
Expand All @@ -97,7 +97,7 @@
"name": "hover_tuple",
"on": [
{
"events": [{"source": "scope", "type": "mouseover"}],
"events": [{"source": "scope", "type": "pointerover"}],
"update": "datum && item().mark.marktype !== 'group' && indexof(item().mark.role, 'legend') < 0 ? {unit: \"concat_0_layer_0\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null",
"force": true
},
Expand All @@ -112,7 +112,7 @@
"value": false,
"on": [
{
"events": [{"source": "scope", "type": "mouseover"}],
"events": [{"source": "scope", "type": "pointerover"}],
"update": "event.shiftKey"
},
{
Expand Down Expand Up @@ -238,7 +238,7 @@
"name": "hover_tuple",
"on": [
{
"events": [{"source": "scope", "type": "mouseover"}],
"events": [{"source": "scope", "type": "pointerover"}],
"update": "datum && item().mark.marktype !== 'group' && indexof(item().mark.role, 'legend') < 0 ? {unit: \"concat_1_layer_0\", _vgsid_: (item().isVoronoi ? datum.datum : datum)[\"_vgsid_\"]} : null",
"force": true
},
Expand All @@ -253,7 +253,7 @@
"value": false,
"on": [
{
"events": [{"source": "scope", "type": "mouseover"}],
"events": [{"source": "scope", "type": "pointerover"}],
"update": "event.shiftKey"
},
{
Expand Down
Loading

0 comments on commit fa97659

Please sign in to comment.