Align+Offset Active Layer
-
JokerMartini
Align+Offset Active Layer
Now messing around with it. It seems to bug that I'm not sure how to trouble shoot.
It only works properly if the user makes the selection in the layer they intend on moving.
If the user makes and selection and then changes the active layer it will not work right.
It only works properly if the user makes the selection in the layer they intend on moving.
If the user makes and selection and then changes the active layer it will not work right.
-
Mike Hale
Align+Offset Active Layer
I am not sure that is a bug. The script works with the active layer and with or without a selection. If the user makes a selection then changes the active layer how is the script to know which layer to align?
The tooltips work for me although some had copy/paste errors that just resigned an already defined tooltip. I am not sure if the middle top and middle bottom buttons are doing what you what. They don't do what I expect, that is they don't align to the top or bottom middle. And I am not sure what the three center buttons should do are why you would want three. It seems that there are a mix of the align icons that are already in the move tool option bar and new ones for the corners. I understand that because of the offset option you would want to include the icons from the options bar but it would make more sense to me if you changed the grouping on the icons.
The tooltips work for me although some had copy/paste errors that just resigned an already defined tooltip. I am not sure if the middle top and middle bottom buttons are doing what you what. They don't do what I expect, that is they don't align to the top or bottom middle. And I am not sure what the three center buttons should do are why you would want three. It seems that there are a mix of the align icons that are already in the move tool option bar and new ones for the corners. I understand that because of the offset option you would want to include the icons from the options bar but it would make more sense to me if you changed the grouping on the icons.
-
Mike Hale
Align+Offset Active Layer
I see what you mean now, the script is somehow using the previous selected layer. I don't yet understand why that is.
-
JokerMartini
Align+Offset Active Layer
The top/bottom middle buttons do what I want them to. Which is just aligning the active layer on 1 axis. The align buttons allow users to choose either to align it on the X or the Y. And then the center Align button aligns both X and Y in one go.
Bug:
setup:Canvas = 800 x 800; Layer 1 = 400 x 400; Layer 2 = 60 x 60; Layer 2 = 20 x 20
1. Layer one is the active layer. Ctrl click this layer to make the selection
2. Then make Layer 2 the active layer and run the script and choose top left
3. Then make Layer 3 the active layer and run the script and choose top left
steps 2 and 3 do not work. It seems though as the boundaries of those layers are not being acknowledged.
Bug:
setup:Canvas = 800 x 800; Layer 1 = 400 x 400; Layer 2 = 60 x 60; Layer 2 = 20 x 20
1. Layer one is the active layer. Ctrl click this layer to make the selection
2. Then make Layer 2 the active layer and run the script and choose top left
3. Then make Layer 3 the active layer and run the script and choose top left
steps 2 and 3 do not work. It seems though as the boundaries of those layers are not being acknowledged.
-
txuku
Align+Offset Active Layer
Hello JokerMartini
The buttons " Middle ( Top Left Bottom Right ) " respond to randomly ....
I think you need to change lines 156 164 172 180 - delete " undefined " :
Line 156
Code: Select alltheLayer.translate(horCenter - bounds[0] - width/2, target[1] - bounds[1] + offset,target[1] - bounds[1] + offset)
Line 164
Code: Select alltheLayer.translate(target[0] - bounds[0] + offset, verCenter - bounds[1] - height/2)
Line 172
Code: Select alltheLayer.translate(target[2] - bounds[2] - offset, verCenter - bounds[1] - height/2)
Line 180
Code: Select alltheLayer.translate(horCenter - bounds[0] - width/2, target[3] - bounds[3] - offset)
And change line 49 for helpTip
Code: Select alldlg.btnBottomRight.helpTip = 'Align Bottom Right Corner Edges';
The buttons " Middle ( Top Left Bottom Right ) " respond to randomly ....
I think you need to change lines 156 164 172 180 - delete " undefined " :
Line 156
Code: Select alltheLayer.translate(horCenter - bounds[0] - width/2, target[1] - bounds[1] + offset,target[1] - bounds[1] + offset)
Line 164
Code: Select alltheLayer.translate(target[0] - bounds[0] + offset, verCenter - bounds[1] - height/2)
Line 172
Code: Select alltheLayer.translate(target[2] - bounds[2] - offset, verCenter - bounds[1] - height/2)
Line 180
Code: Select alltheLayer.translate(horCenter - bounds[0] - width/2, target[3] - bounds[3] - offset)
And change line 49 for helpTip
Code: Select alldlg.btnBottomRight.helpTip = 'Align Bottom Right Corner Edges';
-
JokerMartini
Align+Offset Active Layer
The reason I have undefined is because I only want the script to align the object in one axis for example if you click top middle button it just aligns the top edge, it does not align the top edge and the center of the object, that is why I have that center buttton. Incase you want to center it and then align it to an edge.
So if i have a row of boxes going from left to right and I want to align them all to the top edge I can just click the top middle button and align them all to the top, without centering them all.
That makes sense?
That is why I had undefined there, so it wouldn't alter that position of the x or y.
No do know why its bugging out when I make my selection and then change the active layer?
So if i have a row of boxes going from left to right and I want to align them all to the top edge I can just click the top middle button and align them all to the top, without centering them all.
That makes sense?
That is why I had undefined there, so it wouldn't alter that position of the x or y.
No do know why its bugging out when I make my selection and then change the active layer?
-
JokerMartini
Align+Offset Active Layer
This is the reason I had those set to undefined.
I want it to do this when I hit the top middle align button.
but if you wanted them to all be centered and then aligned to the top you would hit the center icon/button
I want it to do this when I hit the top middle align button.
but if you wanted them to all be centered and then aligned to the top you would hit the center icon/button
-
JokerMartini
Align+Offset Active Layer
Does anyone know of a solution to the problem of the bugging out of the script.
It bugs out when the user makes the selection and then changes the active layer and tries to run the script.
Bug:
setup:Canvas = 800 x 800; Layer 1 = 400 x 400; Layer 2 = 60 x 60; Layer 3 = 20 x 20
1. Layer 1 is the active layer. Ctrl click this layer to make the selection
2. Then make Layer 2 the active layer and run the script and choose top left
3. Then make Layer 3 the active layer and run the script and choose top left
No Bug:
1. Layer 2 is the active layer. Ctrl click Layer 1 to make the selection
2. Then make sure Layer 2 the active layer and run the script and choose top left
It bugs out when the user makes the selection and then changes the active layer and tries to run the script.
Bug:
setup:Canvas = 800 x 800; Layer 1 = 400 x 400; Layer 2 = 60 x 60; Layer 3 = 20 x 20
1. Layer 1 is the active layer. Ctrl click this layer to make the selection
2. Then make Layer 2 the active layer and run the script and choose top left
3. Then make Layer 3 the active layer and run the script and choose top left
No Bug:
1. Layer 2 is the active layer. Ctrl click Layer 1 to make the selection
2. Then make sure Layer 2 the active layer and run the script and choose top left