8000 Align interactions when plot created inside scaled and/or translated elements using CSS transform by alexhartstone · Pull Request #5193 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Align interactions when plot created inside scaled and/or translated elements using CSS transform #5193

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

Merged
merged 63 commits into from
Nov 18, 2020
Merged
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
b9a5d35
888: transform hover event coords to fit css scaling transform
alexhartstone Sep 29, 2020
5e6eee9
888: fix cartesian dragbox
alexhartstone Oct 12, 2020
1741a4a
fix syntax in new files
archmoj Oct 21, 2020
f0232c4
some minor changes
archmoj Oct 21, 2020
3b63fe6
renaming variables and method since list of all elements includes the…
archmoj Oct 21, 2020
5c60d5e
lets not touch dragbox keys
archmoj Oct 21, 2020
2529474
drop unused functions
archmoj Oct 21, 2020
b8e7c6a
declare isMiddle variable in hover
archmoj Oct 22, 2020
0b4f74a
correct size of hover box and position of text
archmoj Oct 22, 2020
a6aeafa
decompose scales when there is also rotation
archmoj Oct 22, 2020
7e8a0e8
drop unused function
archmoj Oct 22, 2020
41820ce
refactor matrix
archmoj Oct 22, 2020
d7665f3
fixup translate within inverseTransformMatrix function
archmoj Oct 22, 2020
c0868c2
replace invert function with gl-mat3 to compute determinant etc. corr…
archmoj Oct 22, 2020
7625a67
use parentNode instead of parentElement for IE support
archmoj Oct 22, 2020
46ed093
increase computed style calls - new one added in hover
archmoj Oct 22, 2020
44769fa
bypass and return default matrix if encountered a problem instead of …
archmoj Oct 22, 2020
463a0ab
transform drag start position
archmoj Oct 22, 2020
e7d9a53
adjust cartesian drag box endpoint in respect to scales
archmoj Oct 22, 2020
080034b
adjust cartesian select start and end point according to parent trans…
archmoj Oct 22, 2020
2bfc471
adjust trace name hover text and box
archmoj Oct 23, 2020
1b78028
adjust left and right alignments
archmoj Oct 23, 2020
f412175
adjust vertical offset between multiple hover boxes
archmoj Oct 23, 2020
825d962
compute inverse transform at graph main div level not the event target
archmoj Oct 23, 8000 2020
7e26e91
compute inverse transform for gd at makePlotFramwork and stash it on …
archmoj Oct 23, 2020
c137f14
no need for extra adjustment for y offset
archmoj Oct 23, 2020
bedbee7
adjust scale of svg hover container in respect to transform for gl3d …
archmoj Oct 23, 2020
2c810fc
handle cases where css transform has a length of 16 using 4x4 matrices
archmoj Oct 26, 2020
c409a28
fixup matrix for translate
archmoj Oct 29, 2020
68f5add
888: cartesian hover test
alexhartstone Nov 2, 2020
8e64281
888: changed transformPlot fn, added dragzoom test
alexhartstone Nov 3, 2020
dbc5232
888: select test
alexhartstone Nov 4, 2020
07b934b
888: more flexible transform testing
alexhartstone Nov 4, 2020
d75c018
888: polar hover test
alexhartstone Nov 5, 2020
d31244a
888: fix polar dragzoom
alexhartstone Nov 9, 2020
94f685f
888: fixed cartesian pan
alexhartstone Nov 10, 2020
435945b
888: use scale factors in polar too for performance
alexhartstone Nov 10, 2020
f3c03cd
888: assign scales at makePlotFramework
alexhartstone Nov 16, 2020
23b4d3c
888: fix polar plot rotation
alexhartstone Nov 16, 2020
84ede31
888: fix alignHTMLWith
archmoj Nov 16, 2020
4b1bf62
888: various syntax fixes
archmoj Nov 16, 2020
d3b548f
888: adjust scatter mapbox hover when css transition is present
archmoj Nov 16, 2020
4e1fd5f
drop unused argument
archmoj Nov 16, 2020
76afc6c
a bit of optimization in choropleth/hover - avoid creating the same a…
archmoj Nov 16, 2020
0117b41
888: fixup scattermapbox both select and hover
archmoj Nov 16, 2020
4980e24
return correct latitude and longitude from mapbox p2c
archmoj Nov 16, 2020
88b24f6
offsetX and offsetY are now implemented in FireFox - remove from blac…
archmoj Nov 17, 2020
b2eed52
888: added polar drag and select tests
alexhartstone Nov 17, 2020
8cc496c
fixup polar test
archmoj Nov 17, 2020
1dee019
expand and fix tests
archmoj Nov 17, 2020
02b6f79
removed hacky clientX and clientY from scattermaobox events
archmoj Nov 17, 2020
805d97b
add scattermapbox tests when css transform is present
archmoj Nov 17, 2020
127f171
expand choropleth hover tests to cover css transform
archmoj Nov 17, 2020
12a57c9
expand choroplethmapbox hover tests to cover css transform
archmoj Nov 17, 2020
34845ec
expand select tests for various traces to cover css transform
archmoj Nov 18, 2020
29e772d
expand ternary hover and drag zoom tests to cover css transform
archmoj Nov 18, 2020
28a9178
remove dirty matrix validation - take care of matrix3d form instead
archmoj Nov 18, 2020
a2f34c9
adjust hover positions on parcats category bands in respect to css tr…
archmoj Nov 18, 2020
9fe42b6
adjust hover positions on sankey nodes in respect to css transforms
archmoj Nov 18, 2020
5681a34
bypass test
archmoj Nov 18, 2020
e94ef47
bapass on more flaky test to pass on the CI
archmoj Nov 18, 2020
9cc0a15
integrate fullLayout inverseTransform and m shorthand
archmoj Nov 18, 2020
95a81fc
refactor polar fix
archmoj Nov 18, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
drop unused function
  • Loading branch information
archmoj committed Oct 22, 2020
commit 7e8a0e8dba7c14271c847eb1b8db7e062ba1a344
23 changes: 0 additions & 23 deletions src/lib/matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,29 +104,6 @@ exports.apply2DTransform2 = function(transform) {
};
};

// applies a 2D transform to something with either the form {left, top, right, bottom}
// or {left, top, width, height}, and returns it in the same format
exports.apply2DTransformToRect = function(transform) {
var at = exports.apply2DTransform2(transform);
return function(rect) {
var rectArray = [
rect.left,
rect.top,
rect.hasOwnProperty('right') ? rect.right : rect.left + rect.width,
rect.hasOwnProperty('bottom') ? rect.bottom : rect.top + rect.height
];
var transformed = at(rectArray);
return {
left: transformed[0],
top: transformed[1],
right: transformed[2],
bottom: transformed[3],
width: transformed[2] - transformed[0],
height: transformed[3] - transformed[1]
};
};
};

// converts a 2x3 css transform matrix, represented as a length 6 array, to a 3x3 matrix.
exports.convertCssMatrix = function(m) {
if(m.length !== 6) {
Expand Down
0