From 7e8b1bfe2280d4fd4546b2ec844a8a7e1873528f Mon Sep 17 00:00:00 2001 From: jdeveloper Date: Wed, 15 Oct 2014 11:23:59 +0200 Subject: [PATCH] Fixed resize handler when kiwi is wraped inside another document --- client/src/views/resizehandler.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/views/resizehandler.js b/client/src/views/resizehandler.js index 96400a8..85d4956 100644 --- a/client/src/views/resizehandler.js +++ b/client/src/views/resizehandler.js @@ -22,7 +22,9 @@ _kiwi.view.ResizeHandler = Backbone.View.extend({ onDrag: function (event) { if (!this.dragging) return; - this.$el.css('left', event.clientX - (this.$el.outerWidth(true) / 2)); + var offset = $('#kiwi').offset().left; + + this.$el.css('left', event.clientX - (this.$el.outerWidth(true) / 2) - offset); $('#kiwi .right_bar').css('width', this.$el.parent().width() - (this.$el.position().left + this.$el.outerWidth())); _kiwi.app.view.doLayout(); } -- 2.25.1