From 4d65eaf2f90894969b88e2cae8b0a53330207366 Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Thu, 7 Oct 2010 20:20:43 +0000 Subject: [PATCH] Added support for editing inside rotated groups (issue 615), fixed some minor bugs git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1782 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/contextmenu/jquery.contextMenu.js | 4 ++-- editor/svg-editor.js | 8 +++++--- editor/svgcanvas.js | 10 ++++++++-- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/editor/contextmenu/jquery.contextMenu.js b/editor/contextmenu/jquery.contextMenu.js index 75b79491..52bed9b0 100755 --- a/editor/contextmenu/jquery.contextMenu.js +++ b/editor/contextmenu/jquery.contextMenu.js @@ -50,9 +50,9 @@ if(jQuery)( function() { var x_off = $(window).width() - menu.width(), y_off = $(window).height() - menu.height(); - + if(x > x_off) x = x_off-15; - if(y > y_off) y = y_off-15; + if(y > y_off) y = y_off-30; // 30 is needed to prevent scrollbars in FF // Show the menu $(document).unbind('click'); diff --git a/editor/svg-editor.js b/editor/svg-editor.js index b990d2c1..aed2be5e 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -2668,9 +2668,11 @@ var updateTitle = function(title) { title = title || svgCanvas.getDocumentTitle(); var new_title = orig_title + (title?': ' + title:''); - if(cur_context) { - new_title = new_title + cur_context; - } + + // Remove title update with current context info, isn't really necessary +// if(cur_context) { +// new_title = new_title + cur_context; +// } $('title:first').text(new_title); } diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 270e9515..a97698e8 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -5462,8 +5462,14 @@ var getMouseTarget = this.getMouseTarget = function(evt) { } if(getRotationAngle(mouse_target)) { - // Don't do for rotated groups for now - return; + // TODO: Allow method of in-group editing without having to do + // this (similar to editing rotated paths) + + // Ungroup and regroup + canvas.ungroupSelectedElement(); + canvas.groupSelectedElements(); + mouse_target = selectedElements[0]; + clearSelection(true); } // Reset context if(current_group) {