Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

thoughtless last won the day on March 27 2012

thoughtless had the most liked content!

thoughtless

Members
  • Posts

    6
  • Joined

  • Last visited

  • Days Won

    1

thoughtless last won the day on March 27 2012

thoughtless had the most liked content!

Profile Information

  • Location
    Detroit

thoughtless's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. Apparently there is an easy way to keep this from happening, at least with flex4... Set clipContent="false" on your FlexTransformManager. My handles are now completely visible -- even the ugly rotation handle at the bottom that I was forced to create..
  2. To anyone interested, it was very easy to add the rotation handle. As posted above, the following code is wrong: _handles[9].point = new Point(r.x + r.width / 2, r.y + r.height + 15); It should be: _handles[9].point = new Point(r.x + r.width / 2, r.y + r.height); I wanted the handle to be 15 px below the box, but it turns out, this was the core of the problem and was what was causing the handle to drift. To just to recap, to add a single rotation handle that is fixed to the bottom of the bounding box, do the following (I may have forgotten something, but this will at least get you on the right track): To function plotHandles, add the following at the end: _handles[9].point = new Point(r.x + r.width / 2, r.y + r.height); //far bottom (rotate) In function initSelection, add the following, just after the other similar declarations: createHandle("fb", "other", -90, 0, "fb"); // far bottom, rotate And finally, add the following to function redrawHandles. It should appear in the if function (in the for) that starts with "if (_handles.type == "corner" )" } else if (_handles[i].type == "other") { r = _handles[i].rotationHandle; rx = ry = -halfH - 2; r.graphics.clear(); r.graphics.lineStyle(1, _lineColor, 1); r.graphics.lineTo( 0, 15 ); r.graphics.lineStyle(0, _lineColor, 0); r.graphics.beginFill(_lineColor, 1); r.graphics.drawEllipse(rx, ry+15, _handleSize + 4, _handleSize + 4); r.graphics.endFill(); } That draws a fixed handle at the bottom of the box, and includes my own custom hardcoded values which you will probably want to change. I also changed the if to be "if (_handles.type == "corner" && 1 == 0 )" to disable the normal rotation handles. Next, to figure out how I can change the cusor to a full rotation icon when hovering over the icon... or at the very least, the opposite direction.
  3. Damn. I'm going to need to solve it somehow, so when I come up with a solution, I'll post it back here.
  4. I agree it's ugly. But it is a requirement... I'm not looking for you to rewrite the class to work with my plans or even saying that senocular is better or anything like that. It was just a live example. There is a reason I chose your class and not that one. I was just hoping that since you have a more complete understanding of your code, you would instantly know why it would drift on scale and be able to give me a few pointers. And we did purchase your code, so I wouldn't exactly call it free... I agree with you here for most usage cases. Except, what if you had an image with a 1x1 px dot in the center -- but the image was 50x50? My problem is that I have text (in swf form -- inherited problem...) being imported and you have to try to grab a letter to move it. I could see this as being a good t/f option for future versions. At any rate, thanks for your hard work on this and double thanks for the extended documentation. It has made it a breeze to get setup.
  5. I lied, I have a third question. I should have mentioned in my previous post, I am using Flex and FlexTransformManager. I notice that if you defined a constraining box, it works as expected with everything except the rendering of the handles. For example, if you drag an item to the corner of the box, the handles get clipped by the constraining box and partially disappear. It seems to me the desired functionality would be to have the handles not get clipped, and appear (even if they are outside the constraining box). Any advice on implementing this? Thanks.
  6. I'm working on a project that has purchased TransformManager. TransformManager works pretty well as-is, but I have gotten to the point that I need to add some customizations to the core class. Specifically, a single rotation handle. For a working example, you can look at senocular's tool -- http://www.senocular.com/demo/Transform ... mTool.html and click on an image and then "transform tool type". Any advice on how to do this with TransformManager? I have it working, but if you scale the image at all, the rotate handle drifts. The changes I made: Added the following to plotHandles(): _handles[9].point = new Point(r.x + r.width / 2, r.y + r.height + 15); And then added code that looks for that handle and draws the rotation handle. It seems that this .point gets updated on scale someplace, but I can't seem to find where. It works great and as expected when the element is first rendered, but after scaling, it drifts. And a second question: I notice for some elements (with transparency), you must click on a non-transparent area to get the element selected. I have a few ideas to fix this but I figured I'd just ask you here since I'm posting, any ideas on how to make the entire box clickable to select, instead of just the non-transparent parts? Edit: It looks like the transparency problem I mentioned is the opposite problem of viewtopic.php?f=3&t=459 I was thinking I could apply some background color and set the alpha to 0 for the element as a fix for my problem. Any thoughts? Thanks.
×