@@ -699,6 +699,7 @@ var VisualizerUI = (function($, window, undefined) {
699
699
width : 500
700
700
} ) ;
701
701
702
+
702
703
/* XXX removed per #900
703
704
// insert the Save link
704
705
var $fileBrowserButtonset = fileBrowser.
@@ -1684,9 +1685,10 @@ var VisualizerUI = (function($, window, undefined) {
1684
1685
// we may need to move to a different collection.
1685
1686
var oldDocCmpts = selectorData . items [ pos ] [ 2 ] . rsplit ( '/' , 1 ) ;
1686
1687
if ( newDocCmpts [ 0 ] != oldDocCmpts [ 0 ] ) {
1687
- dispatcher . post ( 'setCollection' , [ searchColl + newDocCmpts [ 0 ] + '/' ] ) ;
1688
+ dispatcher . post ( 'setCollection' , [ searchColl + newDocCmpts [ 0 ] + '/' , newDocCmpts [ 1 ] , newDocArgs ] ) ;
1689
+ } else {
1690
+ dispatcher . post ( 'setDocument' , [ newDocCmpts [ 1 ] , newDocArgs ] ) ;
1688
1691
}
1689
- dispatcher . post ( 'setDocument' , [ newDocCmpts [ 1 ] , newDocArgs ] ) ;
1690
1692
}
1691
1693
return false ;
1692
1694
} ;
@@ -1803,11 +1805,12 @@ var VisualizerUI = (function($, window, undefined) {
1803
1805
var svgtop = $ ( 'svg' ) . offset ( ) . top ;
1804
1806
var $inFocus = $ ( '#svg animate[data-type="focus"]:first' ) . parent ( ) ;
1805
1807
if ( ! $inFocus . length && args . matchfocus ) {
1806
- $inFocus = $ ( '[data-span-id=' + args . matchfocus + ']' ) ;
1808
+ $inFocus = $ ( '#svg animate [data-type=" matchfocus"]' ) . parent ( ) ;
1807
1809
}
1808
1810
if ( $inFocus . length ) {
1809
1811
$ ( 'html,body' ) .
1810
- animate ( { scrollTop : $inFocus . offset ( ) . top - svgtop - window . innerHeight / 2 } , { duration : 'slow' , easing : 'swing' } ) ;
1812
+ animate ( { scrollTop : $inFocus . offset ( ) . top - svgtop - window . innerHeight / 2 } ,
1813
+ { duration : 'slow' , easing : 'swing' } ) ;
1811
1814
}
1812
1815
}
1813
1816
dispatcher . post ( 'allowReloadByURL' ) ;
0 commit comments