Skip to content
guoboren edited this page Jun 5, 2020 · 1 revision

Demo见test.htlm

使用方法

	// new一个全局对象
	var wgt = new GBRDrag({
		container : "#widget", // 初始化的divID,基于jquery
		calculateType : 'pixel', //大小计算方式  pixel:像素, percent:百分比
		draggable : true, // 是否可拖动
		resizable : true // 是否可缩放
	});

	// 添加组件
	wgt.addWidget(null, 10, 10, 50, 50);

API

/**
 * 更新配置
 * @param {*} settings 
 */
GBRDrag.prototype.updateSettings(options)

/**
 * 打印组件信息缓存数组
 */
GBRDrag.prototype.getWidgetCache()

/**
 * 清空容器
 */
GBRDrag.prototype.clearGBRDrag()

/**
 * 允许缩放
 */
GBRDrag.prototype.resizableOn()

/**
 * 禁止缩放
 */
GBRDrag.prototype.resizableOff()

/**
 * 允许拖动
 */
GBRDrag.prototype.draggableOn()

/**
 * 禁止拖动
 */
GBRDrag.prototype.draggableOff()
Clone this wiki locally