mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1027792 - The linkAnimation
and linkSelection
methods in CanvasGraphUtils should first check if graphs are actually available, r=pbrosset
This commit is contained in:
parent
3889ab5b5b
commit
d4bdf0070f
@ -1563,6 +1563,9 @@ this.CanvasGraphUtils = {
|
||||
* Merges the animation loop of two graphs.
|
||||
*/
|
||||
linkAnimation: Task.async(function*(graph1, graph2) {
|
||||
if (!graph1 || !graph2) {
|
||||
return;
|
||||
}
|
||||
yield graph1.ready();
|
||||
yield graph2.ready();
|
||||
|
||||
@ -1583,6 +1586,9 @@ this.CanvasGraphUtils = {
|
||||
* Makes sure selections in one graph are reflected in another.
|
||||
*/
|
||||
linkSelection: function(graph1, graph2) {
|
||||
if (!graph1 || !graph2) {
|
||||
return;
|
||||
}
|
||||
graph1.on("selecting", () => {
|
||||
graph2.setSelection(graph1.getSelection());
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user