笑いながらコードを書く。

vimから出たくないフロントエンドエンジニアの備忘録的な何か。

sencha touch

SenchaでitemTpl中で日付フォーマットする方法

~ <div class="date">{[Ext.Date.format(values.date, "Y/m/d")]}</div>, ~ {[]}で囲むとjsで処理が書けるらしい。 values.dateが{date}と等価。

senchaでPanelとかを縦横センタリングしたい時

config: { ~ centered: true, ~ } 他に条件あるかもしれないけどとりあえず。

senchaでPanelとかを縦横センタリングしたい時

config: { ~ centered: true, ~ } 他に条件あるかもしれないけどとりあえず。

Sencha Touch 2でshow,hideをアニメーションさせたい場合

~ config:{ ~ showAnimation: {type:'slideIn', direction: 'up', duration: 200}, hideAnimation: {type:'slideOut', direction: 'down', duration: 200}, ~ } ~ など。

Sencha touch : itemsで指定したアイテムを左右に並べる場合

{ xtype: 'spacer' }を間に挟むことで実現できる ~ items: [ { xtype : 'button', text : 'Cancel', itemId: 'cancelButton' }, { xtype : 'spacer' }, { xtype : 'button', text : 'Done', itemId: 'doneButton' } ] ~ spacerを間に指定した場合、可能な範…

Sencha touch:showとshowByの違い

showByの場合、渡された要素に紐付く形で表示される。 動作としてはtop,leftが自動的に計算され付与され、三角形の矢印が表示される。showの場合、通常通りの表示となる。