Bind ctrl+up/down to zoom for compatibility (my + key doesn't work with current bindings)
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@613 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
4b5a47fa51
commit
8bc6536a86
|
@ -757,6 +757,8 @@ function svg_edit_setup() {
|
||||||
['shift+right', function(){rotateSelected(1)}],
|
['shift+right', function(){rotateSelected(1)}],
|
||||||
['shift+O', selectPrev],
|
['shift+O', selectPrev],
|
||||||
['shift+P', selectNext],
|
['shift+P', selectNext],
|
||||||
|
['ctrl+up', function(evt){clickZoom(true);evt.preventDefault();}],
|
||||||
|
['ctrl+down', function(evt){clickZoom();evt.preventDefault();}],
|
||||||
['+', function(evt){clickZoom(true);evt.preventDefault();}],
|
['+', function(evt){clickZoom(true);evt.preventDefault();}],
|
||||||
['-', function(evt){clickZoom();evt.preventDefault();}],
|
['-', function(evt){clickZoom();evt.preventDefault();}],
|
||||||
['up', function(evt){moveSelected(0,-1);evt.preventDefault();}],
|
['up', function(evt){moveSelected(0,-1);evt.preventDefault();}],
|
||||||
|
|
|
@ -1031,6 +1031,24 @@ function BatchCommand(text) {
|
||||||
if (child.nodeType == 1) {
|
if (child.nodeType == 1) {
|
||||||
var childBox = child.getBBox();
|
var childBox = child.getBBox();
|
||||||
if (childBox) {
|
if (childBox) {
|
||||||
|
// TODO: to fix the rotation problem, we must account for the
|
||||||
|
// child's rotation in the bbox adjustment
|
||||||
|
|
||||||
|
// If the child is rotated at all, we should figure out the rotated
|
||||||
|
// bbox before the group's transform, remap all four corners of the bbox
|
||||||
|
// via the group's transform, then determine the new angle and the new center
|
||||||
|
/*
|
||||||
|
var childAngle = canvas.getRotationAngle(child) * Math.PI / 180.0;
|
||||||
|
var left = childBox.x - gcx,
|
||||||
|
top = childBox.y - gcy,
|
||||||
|
right = childBox.x + childBox.width - gcx,
|
||||||
|
bottom = childBox.y + childBox.height - gcy;
|
||||||
|
|
||||||
|
var ptTopLeft = remap(left,top),
|
||||||
|
ptTopRight = remap(right,top),
|
||||||
|
ptBottomLeft = remap(left,bottom),
|
||||||
|
ptBottomRight = remap(right,bottom);
|
||||||
|
*/
|
||||||
var pt = remap(childBox.x,childBox.y),
|
var pt = remap(childBox.x,childBox.y),
|
||||||
w = scalew(childBox.width),
|
w = scalew(childBox.width),
|
||||||
h = scaleh(childBox.height);
|
h = scaleh(childBox.height);
|
||||||
|
|
Loading…
Reference in New Issue