-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Persistent point selection with transforms compatibility #2163
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
etpinard
merged 11 commits into
persistent-point-selection
from
persistent-point-selection-compat-transforms
Nov 16, 2017
Merged
Changes from 4 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
54cc67b
make hover AND select use same event data pipeline
etpinard 638d03d
adapt Histogram.eventData so that it works with selection pts
etpinard b30fab4
add Scattercarpet.eventData method
etpinard 949b311
add ScatterTernary.eventData method
etpinard 315e632
add Lib.tagSelected made to make selectedpoints work w/ transforms
etpinard 9b79b3f
add support for selection of aggregations
etpinard 9210278
update point-selection baseline
etpinard 261387d
update event-data jasmine tests (mostly adding pointIndex)
etpinard 451778b
speed up is-pt-index-valid check
etpinard c8d715b
emit 'normalized' a/b/c coords in scatterternary event data
etpinard 7543dc6
move ptNumber2cdIndex computation to main binning loop
etpinard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* Copyright 2012-2017, Plotly, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
module.exports = function eventData(out, pt, trace, cd, pointNumber) { | ||
var cdi = cd[pointNumber]; | ||
|
||
out.a = cdi.a; | ||
out.b = cdi.b; | ||
|
||
return out; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* Copyright 2012-2017, Plotly, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
module.exports = function eventData(out, pt, trace, cd, pointNumber) { | ||
if(pt.xa) out.xaxis = pt.xa; | ||
if(pt.ya) out.yaxis = pt.ya; | ||
|
||
if(cd[pointNumber]) { | ||
var cdi = cd[pointNumber]; | ||
|
||
// N.B. These are the scale coordinates !!! | ||
// | ||
// On master, hover events get the non-scaled coordinates | ||
// whereas selection events get the scaled version. | ||
// Note also that the hover labels show the scaled version. | ||
// | ||
// What about the 'raw' input coordinates? | ||
// Should we include them in parallel here or replace a/b/c with them? | ||
out.a = cdi.a; | ||
out.b = cdi.b; | ||
out.c = cdi.c; | ||
} else { | ||
// for fill-hover only | ||
out.a = pt.a; | ||
out.b = pt.b; | ||
out.c = pt.c; | ||
} | ||
|
||
return out; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the scaled (normalized) coords are the most useful here, and folks can get the raw data back out easily enough using the indices, lets not add them here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in c8d715b