##// END OF EJS Templates
Fix CM related sizing issues for completer and tooltip.
Brian E. Granger -
Show More
@@ -198,8 +198,8 b' var IPython = (function (IPython) {'
198
198
199 // TODO: I propose to remove enough horizontal pixel
199 // TODO: I propose to remove enough horizontal pixel
200 // to align the text later
200 // to align the text later
201 this.complete.css('left', pos.x + 'px');
201 this.complete.css('left', pos.left + 'px');
202 this.complete.css('top', pos.yBot + 'px');
202 this.complete.css('top', pos.bottom + 'px');
203 this.complete.append(this.sel);
203 this.complete.append(this.sel);
204
204
205 $('body').append(this.complete);
205 $('body').append(this.complete);
@@ -292,27 +292,21 b' var IPython = (function (IPython) {'
292 // whatever anchor/head order but arrow at mid x selection
292 // whatever anchor/head order but arrow at mid x selection
293 var anchor = this.code_mirror.cursorCoords(false);
293 var anchor = this.code_mirror.cursorCoords(false);
294 var head = this.code_mirror.cursorCoords(true);
294 var head = this.code_mirror.cursorCoords(true);
295 var pos = {};
295 var xinit = (head.left+anchor.left)/2;
296 pos.y = head.top
297 pos.yBot = head.bottom
298 pos.x = (head.left+anchor.left)/2;
299
300 var xinit = pos.x;
301 var xinter = o.left + (xinit - o.left) / w * (w - 450);
296 var xinter = o.left + (xinit - o.left) / w * (w - 450);
302 var posarrowleft = xinit - xinter;
297 var posarrowleft = xinit - xinter;
303
298
304
305 if (this._hidden == false) {
299 if (this._hidden == false) {
306 this.tooltip.animate({
300 this.tooltip.animate({
307 'left': xinter - 30 + 'px',
301 'left': xinter - 30 + 'px',
308 'top': (pos.yBot + 10) + 'px'
302 'top': (head.bottom + 10) + 'px'
309 });
303 });
310 } else {
304 } else {
311 this.tooltip.css({
305 this.tooltip.css({
312 'left': xinter - 30 + 'px'
306 'left': xinter - 30 + 'px'
313 });
307 });
314 this.tooltip.css({
308 this.tooltip.css({
315 'top': (pos.yBot + 10) + 'px'
309 'top': (head.bottom + 10) + 'px'
316 });
310 });
317 }
311 }
318 this.arrow.animate({
312 this.arrow.animate({
General Comments 0
You need to be logged in to leave comments. Login now