Flex 4 - 创建弹出窗口而不禁用背景/拖动图像而无需鼠标触发?

发布于 2024-10-10 02:20:10 字数 844 浏览 4 评论 0原文

很抱歉打扰你,但我希望你能帮助我。我们目前正在构建一个新网站,但我们的程序员遇到了一些问题。我正在尝试做一些研究,看看我们是否可以找到解决我的问题的方法,以便我可以让我的程序员知道。

第一期:

转到此处:http://tinyurl.com/276we3f 在弹出窗口中只需输入一些示例文本。

现在,当您将鼠标悬停在卡片左侧的任何文本框上时,您将看到文本框突出显示并带有边框。如果您单击文本框,则会出现一个属性弹出窗口,允许您更改字体、颜色、对齐方式等。单击关闭时,它将带您返回产品并突出显示文本。我希望用户能够单击文本框中的任意位置来输入新文本。例如,在底部文本框中显示“加入我们庆祝”,用户应该能够单击该文本中的任意位置来更改措辞。他们可能希望它说“和我一起庆祝”而不是“和我们一起庆祝”。但是,如果他们单击“我们”一词旁边的按钮以便可以更改它......则会出现弹出窗口。

有没有办法只让弹出窗口出现在侧面而不使背景变灰和禁用?

另外,有没有一种方法可以单击文本框中的任意位置来编辑某些单词或字母?

第二个问题也是最后一个问题: 如果您单击“单击添加照片”,您将看到一个弹出窗口,允许您上传图像、编辑图像等。上传图像后,我希望用户能够使用以下命令移动图像他们通过拖动鼠标并将其放置在他们想要的确切位置。我们还有箭头,他们可以在图像编辑器弹出窗口中单击向上、向下、向左或向右箭头......但我会希望他们也能够用鼠标拖动图像。我们知道如何启用图像的拖动。但是,当用户释放鼠标按钮时就会出现问题。当用户完成拖动时,在鼠标上...将出现弹出窗口,因为弹出窗口是通过释放鼠标按钮触发的。

这有道理吗?

很抱歉留言很长,非常感谢您的帮助!

Sorry to bother you, but I was hoping you could help me. We are currently building a new web site and have run into some issues with our programmer. I am trying to do some research to see if we can find a way for my issue to be solved so that I can let my programmer know.

First issue:

Go here: http://tinyurl.com/276we3f
At the pop-up just enter some example text.

Now, when you hover over any text boxes on the left of the card, you will see that the text boxes become highlighted with a border. If you click in a text box, a properties pop-up appears that allows you to change the font, color, alignment, etc. When you click close, it will take you back to the product and will highlight the text. I want the user to be able to click anywhere within a text box to type new text. For example, in the bottom text box, where it says "join us to celebrate", the user should be able to click anywhere in that text to change the wording. They might want it to say "join me to celebrate" instead of "join us to celebrate". However, if they click next to the word "us" so that they can change it....the pop-up appears.

Is there a way to just have a pop-up appear to the side and not have the background grayed out and disabled?

Also, is there a way to be able to click anywhere in the text box to edit just certain words or letters?

Second and final question:
If you click on "Click to add photo", you will see a pop-up appear that allows you to upload an image, edit it, etc. After uploading the image, I want the user to be able to move the image around with their mouse by dragging it and positioning it in the exact spot that they want it in. We also have the arrows where they can click the up, down, left or right arrow in the image editor pop-up....but I would like for them to be able to drag the image with their mouse as well. We know how to enable dragging of the image. However, the problem occurs when the user releases the mouse button. On the mouseup when the user is done dragging....the pop-up will appear since the pop-up is triggered by the release of the mouse button.

Does that make sense?

Sorry for the long message and THANKS SO MUCH for your help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

贩梦商人 2024-10-17 02:20:10

对于问题的第一部分,当显示文本区域属性的对话框时,您可以将其弹出为非模式窗口。这意味着属性对话框将显示,但不会锁定 UI 的其余部分,从而使用户能够根据自己的喜好更改文本。这也意味着背景不会模糊/变灰。要以非模态状态弹出窗口,请调用 PopUpManager.createPopUp(或 PopUpManager.addPopUp),并将第三个参数(modal)设置为 false。

对于第二个问题,当检测到用户正在拖动图像时,将成员变量(例如“isDragging”)设置为 true。然后,当鼠标松开时,如果 isDragging 为 false,则仅显示弹出窗口。

希望有帮助。

For the first part of your question, when showing the dialog box for the properties of the text area, you can pop it up as a non-modal window. This means the properties dialog will show but will not lock out the rest of the UI, enabling the user to change the text however they like. It also means the background does not blur/grey out. To pop up a window in a non-modal state, call PopUpManager.createPopUp (or PopUpManager.addPopUp) with the third parameter (modal) set to false.

For the second issue, set a member variable such as "isDragging" to true when you detect that the user is dragging the image around. Then on mouse up, only display the pop up if isDragging is false.

Hope that helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文