Commit 8233ca86 authored by Benjamin Fischer's avatar Benjamin Fischer
Browse files

CodeEditor: fixed resizing of codeeditor components

parent 3bbf9c12
......@@ -45,7 +45,7 @@ define(["jquery", "emitter"], function($, Emitter) {
},
stop: function(event, ui) {
var width = $(self.view.$content).width();
var r = 100.0 * (event.pageX) / width;
var r = 100.0 * (ui.position.left) / width;
//prevent overflow if event.pageX > width
//which might be the case if editor is shown on two screens
if (r > 100.0) {
......@@ -69,10 +69,9 @@ define(["jquery", "emitter"], function($, Emitter) {
//when resizing the window)-->own hack
stop: function(event, ui) {
var height = $(self.view.$content).height();
var offset = $(window).height() - height; //the offset in y due to the tabs etc.
var r = 100.0 * (event.pageY - offset) / height;
var r = 100.0 * (ui.position.top) / height;
if (event.pageY < offset) {
if (r > 100.0) {
self.yDragbar.css("top", self.oldYDragPosition); //restore old position
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment