-
Notifications
You must be signed in to change notification settings - Fork 28
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
Support vertical band connection with independent scales on top and bottom axes #160
Comments
What about in circular? |
For example, in viewport tracks (here), x and y scales are updated together by another view: constructor() {
const { registerViewportChanged, removeViewportChanged } = context;
registerViewportChanged(uid, this.viewportChanged.bind(this));
...
}
viewportChanged(viewportXScale, viewportYScale) { ... } where const fromView = track.fromViewUid;
track.registerViewportChanged = (trackId, listener) => this.addScalesChangedListener(fromView, trackId, listener); addScalesChangedListener(viewUid, listenerUid, eventHandler) {
if (!this.scalesChangedListeners[viewUid]) {
this.scalesChangedListeners[viewUid] = {};
}
this.scalesChangedListeners[viewUid][listenerUid] = eventHandler;
if (!this.xScales[viewUid] || !this.yScales[viewUid]) { return; }
// call the handler for the first time
eventHandler(this.xScales[viewUid], this.yScales[viewUid]);
} Also, setCenter is updating the position and zoom level of tracks. |
ViewConfig-wise, we should (1) be able to differentiate x and y axes and (2) allow cross-axis lock. So we can do something like the following: "locksByViewUid": {
"view-1": { "x": { "lock": "lock-1", "axis": "y" }, "y": { "lock": "lock-2", "axis": "x" } },
"view-2": { "x": { "lock": "lock-2", "axis": "y" }, "y": { "lock": "lock-1", "axis": "x" } },
},
"locksDict": {
"lock-1": {
"view-1": [
1550000000,
1550000000,
3380588.876772046
],
"view-2": [
1550000000.0000002,
1549999999.9999993,
3380588.876772046
],
"uid": "lock-1"
},
"lock-2": {
"view-1": [
1550000000,
1550000000,
3380588.876772046
],
"view-2": [
1550000000.0000002,
1549999999.9999993,
3380588.876772046
],
"uid": "lock-2"
}
} To allow using the current way of linking views, the following can be still possible: // Link x and y axes between two views
"locksByViewUid": {
"view-1": "lock-1",
"view-2": "lock-1" ,
}, |
Currently working on a branch named https://github.com/higlass/higlass/tree/sehilyi/axis-independent-projection |
This is addressed by #451 |
Refer to "ToDo" in #451 for next steps |
Another example with three views: "locksByViewUid": {
"view-1": {
"x": // Source axis from `lock-1`
{
"lock": "lock-1",
"axis": "x" // Target axis to apply to `"view-1"`
}
},
"view-2": { "y": { "lock": "lock-2", "axis": "x" } },
"view-3": { "x": { "lock": "lock-2", "axis": "y" }, "x": { "lock": "lock-1", "axis": "x" }, },
},
"locksDict": {
"lock-1": {
"view-1": [
1550000000,
1550000000,
3380588.876772046
],
"view-3": [
1550000000.0000002,
1549999999.9999993,
3380588.876772046
],
"uid": "lock-1"
},
"lock-2": {
"view-2": [
1550000000.0000002,
1549999999.9999993,
3380588.876772046
],
"view-3": [
1550000000.0000002,
1549999999.9999993,
3380588.876772046
],
"uid": "lock-2"
}
} Linking x-axes between Grey and Red views, and linking between the x-axis of Green and the y-axis of Red. Using a similar approach, I think we can draw vertical bands (I.e., Grey and Green being top and bottom views and Red being the band connection view).
|
The text was updated successfully, but these errors were encountered: