Dojo demo2 - how not to use placeAt / place methods in dojo toolkit.
This commit is contained in:
parent
313747938e
commit
4dd5fa2b15
5 changed files with 92 additions and 0 deletions
26
dojo_demo2/widgets/SimpleWidget.js
Normal file
26
dojo_demo2/widgets/SimpleWidget.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
define([
|
||||
'dojo/_base/declare',
|
||||
'dojo/dom-construct',
|
||||
'dijit/_WidgetBase',
|
||||
'dijit/_TemplatedMixin',
|
||||
'dojo/text!widgets/SimpleWidget.html'
|
||||
], function(declare, domConstruct, _WidgetBase, _TemplatedMixin, template) {
|
||||
return declare([_WidgetBase, _TemplatedMixin], {
|
||||
templateString: template,
|
||||
|
||||
constructor: function(props) {
|
||||
this._idx = 0;
|
||||
},
|
||||
|
||||
postCreate: function() {
|
||||
this.inherited(arguments);
|
||||
},
|
||||
|
||||
clickMeHandle: function() {
|
||||
console.log('Click me handle');
|
||||
|
||||
var item = domConstruct.create('div', { innerHTML: this._idx++ });
|
||||
domConstruct.place(item, this.point, 'only');
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue