【发布时间】:2015-02-12 14:34:54
【问题描述】:
最近我将 extjs 4 升级到 5,然后我发现 textarea 没有可拖动和可调整大小的功能,但它可以完美地在 extjs v4 上运行。 我创建小提琴来测试它: Fiddle
我该如何解决?这是一个错误还是我错了?
这是我使用的代码:
Ext.define('Textarea', {
extend: 'Ext.form.field.TextArea',
alias: 'widget.ddtext',
contextMenu: true,
root: null,
name: 'text',
emptyText: "Enter your text here",
cls: "textInput",
resizable: true,
draggable: {
constrain: true,
preventDefault: false,
stopEvent: true
}
});
Ext.define('TestWindow', {
extend: "Ext.window.Window",
alias: "widget.ddwindow",
title: 'Window',
width: 550,
height: 670,
resizable: false,
layout: 'fit',
modal: true,
items: {
itemId: "windowContainer",
autoScroll: true,
xtype: "container",
layout: {
type: 'vbox',
padding: 5
},
defaults: {
width: "100%"
},
items: [
{
itemId: "container",
xtype: "container",
layout: 'vbox',
items: [
{
itemId: "dropZone",
xtype: "container",
height: 500,
width: 500,
style:{
backgroundColor: "#000"
},
layout: "absolute",
scope: this,
items: [
{
xtype: 'ddtext'
}
]
}
]
}
]
}
});
Ext.application({
name : 'Fiddle',
launch : function() {
Ext.create("TestWindow").show();
}
});
【问题讨论】:
标签: javascript extjs draggable extjs5 resizable