View Full Version : hideMode: 'offsets' not working

9 Apr 2012, 7:15 AM
I'm rendering a graph on a tab, which may or may not be visible at render time.

Problem: when the tab is NOT visible there are no drawing instructions under the <svg> element in the DOM (aka, no graph is drawn).

The doc says use hideMode set to 'offsets'. And, when the graph's tab is brought into view, use setPosition to bring the graph into view. But, there is no graph to bring into view.

Only when the tab is visible do drawing instructions show up in the DOM under the <svg> element.

Here's the configs setting for the panel containing the graph. $(_gdiv) is the graph's containing div:

_panel = Ext.create('Ext.Panel', {
width: '100%',
height: '100%',
hidden: false,
hideMode: 'offsets',
maximizable: false,
floating: { shadow: false },
draggable: false,
title: _title,
renderTo: $(_gdiv).attr('id'),
layout: 'fit',
constrainTo: 'body'
if ($(_gdiv).is(":hidden") === true) {
_panel.setPosition(-10000, -10000);

What combo of configs settings do I need? Or, need to avoid (e.g. if there's some side effect per what I'm doing above).

NOTE: the containing div is hard-coded to a height and width of 400px and 1000px, respectively.