PDA

View Full Version : [OPEN-EXTJSIV-157] Ext.draw.Component viewbox issue



4CastRisk
17 Mar 2011, 4:05 PM
Trying to write a component window that has a draw surface inside it:



Ext.define 'Quartermaster.components.chart.Window',
extend: 'Ext.window.Window'
alias: 'Quartermaster.CustomChart'

initComponent: ->
Ext.apply @,
layout: 'fit'
title: 'Chart Window'
iconCls: 'icon-application'
width: 960
height: 400
plain: yes
closeAction: 'hide'
center: yes
maximizable: yes
minimizable: no # This will change in future releases
collapsible: yes
items: [
Ext.create 'Ext.draw.Component', {scope: @}
]

@callParent arguments


Throws an error in firefox:

Unexpected value Infinity Infinity -Infinity -Infinity parsing viewBox attribute.

SVG generated looks like this:


<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="948" height="366" id="ext-gen1171" viewBox="Infinity Infinity -Infinity -Infinity" style="width: 948px; height: 366px;"><defs/><rect width="100%" height="100%" fill="#000" stroke="none" opacity="0" id="ext-gen1172"/></svg>

Jamie Avins
17 Mar 2011, 4:16 PM
Thank you for the report, we'll put some bounds checking on that.