@@ -992,6 +992,16 @@ ExecutionVisualizer.prototype.updateOutput = function(smoothTransition) {
992992 return ;
993993 }
994994
995+
996+ // really nitpicky!!! gets the difference in width between the code display
997+ // and the maximum width of its enclosing div
998+ myViz . codeHorizontalOverflow = myViz . domRoot . find ( '#pyCodeOutput' ) . width ( ) - myViz . domRoot . find ( '#pyCodeOutputDiv' ) . width ( ) ;
999+ // should always be positive
1000+ if ( myViz . codeHorizontalOverflow < 0 ) {
1001+ myViz . codeHorizontalOverflow = 0 ;
1002+ }
1003+
1004+
9951005 // crucial resets for annotations (TODO: kludgy)
9961006 myViz . destroyAllAnnotationBubbles ( ) ;
9971007 myViz . initStepAnnotation ( ) ;
@@ -2628,6 +2638,9 @@ AnnotationBubble.prototype.showEditor = function() {
26282638 position : {
26292639 my : this . my ,
26302640 at : this . at ,
2641+ adjust : {
2642+ x : ( myBubble . type == 'codeline' ? - 6 : 0 ) , // shift codeline tips over a bit for aesthetics
2643+ } ,
26312644 effect : null , // disable all cutesy animations
26322645 }
26332646 } ) ) ;
@@ -2670,6 +2683,7 @@ AnnotationBubble.prototype.showViewer = function() {
26702683 assert ( this . state == 'edit' || this . state == 'invisible' ) ;
26712684 assert ( this . text ) ; // must be non-empty!
26722685
2686+ var myBubble = this ;
26732687 // destroy then create a new tip:
26742688 this . destroyQTip ( ) ;
26752689 $ ( this . hashID ) . qtip ( $ . extend ( { } , qtipShared , {
@@ -2678,6 +2692,9 @@ AnnotationBubble.prototype.showViewer = function() {
26782692 position : {
26792693 my : this . my ,
26802694 at : this . at ,
2695+ adjust : {
2696+ x : ( myBubble . type == 'codeline' ? - 6 : 0 ) , // shift codeline tips over a bit for aesthetics
2697+ } ,
26812698 effect : null , // disable all cutesy animations
26822699 }
26832700 } ) ) ;
0 commit comments