mootools 从左调整大小,不能从右调整大小
mootools函数makeRessized允许你指定一个句柄,这意味着我可以设置一个句柄我想要调整大小的元素的左侧。但拖动操作只允许从右向左拉动,不允许从左向右拉动。
有没有办法修改函数来让我这样做?我希望能够在元素的左侧和右侧使用手柄。
编辑: 另外,我还为另一个元素设置了可调整大小以进行垂直调整。而且逻辑似乎是颠倒的。我必须向上滚动到最大元素更小。为什么会这样呢?元素上的绝对位置设置为 bottom:0; left:0;
(在相对容器内)
The mootools function makeResizable allows you to specify a handle, which means I can set a handle to the left of the element I want to resize. But the drag operation only allows to pull from the right to the left, not left to right.
Is there a way I can modify the function to let me do so? I'd like to be able to use a handle on the left and right of my element.
Edit:
Also, I have set a resizable for another element for vertical resizing. And the logic seems to be inversed. I have to scroll up to max the element smaller. Why would this be? Absolute position on the element is set to bottom:0; left:0;
(inside a relative container)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好问题!
据我所知,直接使用 makeResizable 处理左右两侧是不可能的。顺便说一句,通过尝试使用 makeDraggable 做一些技巧,您可以设置要调整大小的元素和 2 个拖动器(1 个左,1 个右),并且通过拖动每个元素,您可以将元素的左/宽度属性设置为- 调整大小。即
html:
css:
js: 检查这个小提琴
这个例子只是一个草图< /em> 这一点还需要改进。不过我认为这是一个很好的起点,或者是一个想法;)
good question!
As far as I know handling both left and right is not possible directly using makeResizable. Btw, by trying to make some tricks using makeDraggable, you could set the element-to-be-resized and 2 draggers (1 left, 1 right) and by dragging each element you could set the left/width properties of the element-to-be-resized. i.e.
html:
css:
js: check this fiddle
This example is just a sketch that has to be improved . However I think it's a good starting point, or an idea ;)