when add pdf panel in a Panel
such as
==================================
Code:
...
...other items in sencha touch panel...
...
{
xtype: 'container',
itemId: 'pnlHoldPdfViewer',
layout: {
type: 'fit'
},
scrollable: 'both',
items: [
{
xtype : 'pdfpanel',
id:'pdfpanel',
layout : 'fit',
style : {
backgroundColor: '#333'
}
}
]
}
==================================
but the error "Cannot call method 'un' of undefined " occurs in the PDF.js
================================
Code:
...
...
destroy: function() {
var me = this;
me.duringDestroy = true;
me.un({
activate: me.initViewer,
painted: me.initViewer,
load: me.onPdfLoad,
resize: me.resize,
scope: me
});
me.canvasEl.un({
doubletap : me.onDoubleTap,
pinchstart : me.onPagePinchStart,
pinch : me.onPagePinch,
pinchend : me.onPagePinchEnd,
scope : me
});
...
====================================
(But when if view by Ext.viewport.add(....) directly is fine)
Could any one tell me why and how to solve this problem ?
Thanks for any help
Best regards