Open GoogleCodeExporter opened 9 years ago
Ok, i fix the bug changing 2 methods in Chart2D.
1.- Constructor. It seems IE hate values ended with "%" in size when it
calculates
the offeset width/height. The current Chart2D constructor is:
public Chart2D(String width, String height) {
DojoController.getInstance().loadDojoWidget(this);
defineTatamiChart();
setElement(DOM.createDiv());
dojoElem = DOM.createDiv();
DOM.setStyleAttribute(dojoElem, "width", "100%");
DOM.setStyleAttribute(dojoElem, "height", "100%");
DOM.appendChild(getElement(), dojoElem);
setSize(width, height);
}
If you change 100% in code with any value, you have:
public Chart2DExt(String width, String height) {
DojoController.getInstance().loadDojoWidget(this);
defineTatamiChart();
setElement(DOM.createDiv());
dojoElem = DOM.createDiv();
DOM.setStyleAttribute(dojoElem, "width", "500");
DOM.setStyleAttribute(dojoElem, "height", "500");
DOM.appendChild(getElement(), dojoElem);
setSize(width, height);
}
2.- adaptSize(). You must test 0 result getting offesets.
Current adaptSize():
public void adaptSize() {
if(dojoWidget != null){
dojoUpdateSize(dojoWidget,getOffsetWidth(),getOffsetHeight());
}
}
Fixed method:
public void adaptSize() {
if (dojoWidget != null) {
int offsetWidth = getOffsetWidth();
int offsetHeight = getOffsetHeight();
if (offsetWidth != 0 && offsetHeight != 0) {
dojoUpdateSize(dojoWidget, offsetWidth, offsetHeight);
}
}
}
I hope see this bug fixed in 1.3.2 ;)
Original comment by lunarjchav@gmail.com
on 24 Feb 2009 at 9:22
This should be fixed now with the tatami version 1.4.
Original comment by vgrass...@gmail.com
on 9 Oct 2009 at 2:18
I opened a new defect because this is still a problem in version 1.4.
Joel Rives
Original comment by jmri...@gmail.com
on 16 Jun 2011 at 7:23
Original issue reported on code.google.com by
lunarjchav@gmail.com
on 24 Feb 2009 at 8:00