Page 1 of 7 123 ... LastLast
Results 1 to 10 of 68

Thread: Ext.ux.grid.DragSelector for 2.0

  1. #1
    Ext JS Premium Member Foggy's Avatar
    Join Date
    Apr 2007
    Location
    Switzerland
    Posts
    477

    Default Ext.ux.grid.DragSelector for 2.0

    Hi Guys

    So how i say in the premium help forum, heres my implementation of the grid DragSelector.
    First, please concern that i have that hardcore js experience since few months, before i was able to do some easy form validations, but not more
    So this is my really first, Ext.extending, expedient stuff, please consider that


    Currently it should work with any kind of grid, here are my tests with grid3.html in the examples. Just forceFit: true is not optimal for the DragSelector because if you start on a grid row, first this row would be selected because the rowclick event is fired. So the row is marked as selected an would be deselected if the drag selector intersect with this row (hope you understand)

    V 1
    So here are the features:
    - select all with keybord shortcut ctrl+a
    - select by drag selector
    - press ctrl and select with drag selector by keeping existent
    - press ctrl to deselct existent rows by intersect with the drag selector

    Iusses that still bother me
    - call cancelClick if the user click anywhere in the grid, but outside of any row
    - the onBodyKeyDown/UP seems to be fired not until a grid row was selected by click, alltough this event should be fired on Body keydown/up??
    - im not able to scroll down while dragging the selector

    So maybe one of you pro js devs could help me with this three iusses

    Here's a live demo
    Here's the DragSelector.js not documented yet

    V 2
    In this version the autoscroll should run. But there is currently many much to calculate in the onDrag function, so eminently the internet explorer would slow down...
    Tough im still working on these feature and in future realeses i think i would provide some config options for the "scroll down", "ctrl is pressed" and "select all" stuff...
    Anyway here is the preview of the autoscroll grid while dragging the selector:
    http://www.office.uwd.ch/_tests/ext/...2.0/grid3.html
    And here's the current dev JS file:
    http://www.office.uwd.ch/_tests/ext/...ragSelector.js

    Currently there is a bug, that i cant figure out exactly till now, but im working on
    If you scroll to the middle of the grid-data, began to drag the selector and scroll up a little bit, so theres a fault by calculating the drag proxy for a short while...
    I have figured it out that it must be at these if/else constructions:
    Code:
                if ((startXY[1] - scrollTop) < xy[1]) {
                    var y = startXY[1] - scrollTop;
                    var h = Math.abs(y - xy[1]);
                } else {
                    var y = xy[1];
                    var h = Math.abs(startXY[1] - xy[1]) - scrollTop;
                }
    Started at line 106 in the JS File...
    But im confident that im find this bug


    V3 is out now
    So, thats the release of my final version of the Ext.ux.grid.DragSelector.
    -All Bugs are fixe, (i hope so )
    -autoscroll works fine
    -should work with any kind of grid
    -Note ctrl + a => select all does not exists anymore.

    DEMO V3
    JS FILE V3

  2. #2
    Sencha User Ytorres's Avatar
    Join Date
    Jun 2007
    Location
    Rennes, France
    Posts
    285

    Default

    Very nice !
    good work

  3. #3
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258

    Default

    Very impressive, nice work!

  4. #4
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,164

    Default

    Ohhhhhhhh!

    Amazing! Thanks for share!!

  5. #5

    Default

    It is a very good feature! Thanks for share!

  6. #6
    Ext JS Premium Member Foggy's Avatar
    Join Date
    Apr 2007
    Location
    Switzerland
    Posts
    477

    Default

    Hi Guys

    Thanks for your positive responses, im happy that anyone find this useful
    Currently i have fixed the ctrlState iusse if you dont have clicked in the grid before start dragging the selector. And i think i have some kind of ideas to scrolldown, if the grid has a scrollPane. Theres nothing updated yet, just wont let you know that you can expect this in next few days i think

    Greets Foggy

  7. #7
    Ext JS Premium Member Foggy's Avatar
    Join Date
    Apr 2007
    Location
    Switzerland
    Posts
    477

    Default

    There is a preview of the autoscroll option online yet, but im still working on
    Please see my first post...

    Greets Foggy

  8. #8
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,164

    Default

    V2 works great!!

    Thanks for share your job!

    Is a definite version?

    Thanks in advance,

  9. #9
    Ext JS Premium Member Foggy's Avatar
    Join Date
    Apr 2007
    Location
    Switzerland
    Posts
    477

    Default

    no its not really definite, i work on that extension already but have not much time since few weeks...
    But i have some plans to optimize the speed. With large grids the fillRegions method is really slow. I plan to calculating new regions instead of regenerate all region objects in the onScroll Event...
    And fixing some known bugs of course
    So please give me some time
    If i see there are some guys interested i push up my work a bit

  10. #10
    Sencha User Ytorres's Avatar
    Join Date
    Jun 2007
    Location
    Rennes, France
    Posts
    285

    Default

    Hi Foggy,

    I use your plugin in my app and i found a little bug.

    When i use your plugin with a toolbar in a grid and i want to use a TextField in the toolbar, TextField is always desabled and we can't enabled it.

    (Tested with toolbar on bottom of the grid and with version 1 of your great pugin )

    Do you want a live demo for this bug ?

Page 1 of 7 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •