setRowHeight does not work correctly.

Ask for help relating to our Sencha Touch based Scheduler (for iPad, or any other supported phone, phablet or tablet)
Post Reply
User avatar
Antarctica
Posts: 217
Joined: Mon Jan 13, 2014 3:22 pm

setRowHeight does not work correctly.

Post by Antarctica »

I'd like to report a bug in Touch Scheduler 1.0.8. How to reproduce:

Please go into http://www.bryntum.com/examples/touch-s ... basic.html and open Chrome debugger console.

Then type (or copy & paste) in console:

Code: Select all

var view = Ext.Viewport.down('schedulerpanel').getSchedulingView();
view.setRowHeight(view.getRowHeight()+5);
view.setRowHeight(view.getRowHeight()-5); // fails
I would expect (and I hope you do as well) the row height to be the same as before, but it isn't. The last line has not been executed correctly. When playing around some more, I found that whenever I try to revert to the rowHeight the panel started with (60px), it fails silently. Have one pixel difference in any direction and it works (but half a pixel or three quarters of a pixel does not work).

Code: Select all

view.setRowHeight(120);
view.setRowHeight(60); // fails as well
The reason is this line in SchedulingView.js:

Code: Select all

if (height === this.rowHeight) return;
which should be accompanied by

Code: Select all

this.rowHeight = height
or else the change of rowHeight is non-revertible. Or just leave both lines out, since the same check is already (correctly) performed in Sch.view.model.TimeAxis.setViewRowHeight.
Errors are human, but to really mess up, you need a computer.

User avatar
Maxim Gorkovsky
Core Developer
Core Developer
Posts: 3287
Joined: Wed Jan 08, 2014 11:46 am

Re: setRowHeight does not work correctly.

Post by Maxim Gorkovsky »

Hello.
Thank you for the report, I created ticket to track this issue: https://www.assembla.com/spaces/bryntum/tickets/1997

Post Reply