仅使一个 gridster 小部件可调整大小 [英] Make only one gridster widget resizable

查看:20
本文介绍了仅使一个 gridster 小部件可调整大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以只调整一个 gridster 小部件的大小?

Is it possible to make only one gridster widget resizable?

我已经做到了,因此用户可以单击小部件标题,以便它展开 &合同.

I've made it so the user can click on a widget heading so that it expands & contracts.

我想让它在小部件展开时可以调整大小.

I'd like to make it so that when a widget is expanded, it is resizable.

这可以吗?如果有,怎么做?

Can this be done? If so, how?

推荐答案

启用调整大小时,每个小部件都在 span 元素中获取 gs-resize-handlesetup_resize() 函数.

When resize is enable each widget get the gs-resize-handle class in a span element with the setup_resize() function.

所以你可以通过添加一个自定义类来使用 css 来隐藏调整大小的句柄:

so you can play with css to hide the resize handle with css by adding a custom class like :

.no-resize .gs-resize-handle-both{
   display:none;
}

当您扩展您的小部件时,您会删除您的自定义类.

and when you expand your widget your remove your custom class.

另一种方法可能是在 gridster 可扩展演示上的演示中对点击事件进行了一些更改.

An another way to do this could be like in the demo on gridster expandable demo with a some change on the click event.

这篇关于仅使一个 gridster 小部件可调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆