My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 1035: On select click event selection start below mouse position
16 people starred this issue and may be notified of changes. Back to list
Status:  Released
Owner:  ----
Closed:  Sep 2013


Sign in to add a comment
 
Reported by ga...@tagvs.com, Jul 14, 2011
On version 1.5.1 When selecting on week or day view selecting start below mouse position.
This gap form mouse position grows as you go down the rows.

Apparently the position calculated based on slotTableFirstInner size without taking into account the fact that the position calculation should include all row children(the th height > td height)  

A quick fix was changing in AgendaView.setHeight

    function setHeight(height, dateChanged) {
        if (height === undefined) {
            height = viewHeight;
        }
        viewHeight = height;
        slotTopCache = {};
    
        var headHeight = dayBody.position().top;
        var allDayHeight = slotScroller.position().top; // including divider
        var bodyHeight = Math.min( // total body height, including borders
            height - headHeight,   // when scrollbars
            slotTable.height() + allDayHeight + 1 // when no scrollbars. +1 for bottom border
        );
        
        dayBodyFirstCellStretcher
            .height(bodyHeight - vsides(dayBodyFirstCell));
        
        slotLayer.css('top', headHeight);
        
        slotScroller.height(bodyHeight - allDayHeight - 1);
        
        ++slotHeight = slotTableFirstInner.parents('tr').outerHeight() + 1; // +1 for border
        --slotHeight = slotTableFirstInner.height() + 1; // +1 for border
        
        if (dateChanged) {
            resetScroll();
        }
    }
Aug 24, 2011
#1 albertca...@gmail.com
+1 for this one, thanks for the patch, it worked like a charm :)
Sep 29, 2011
Project Member #2 adamrs...@gmail.com
i'm not sure i understand the original problem. could you explain it a little better? (step-by-step what you need to do)? thanks!
Status: Reproducing
Dec 20, 2011
#3 nplangl...@gmail.com
Thank you! You can reproduce this issue still in 1.5.2 when you change the .fc-agenda-slots td div { height: 20px; } to instead be height:10px and then drag/drop external objects onto the full-day agenda.
Dec 20, 2011
#4 albertca...@gmail.com
Uh! i didn't receive the previous mail. As already said, you have to change the height in the CSS and then drag&drop events.
Dec 28, 2011
#5 btpeg...@gmail.com
Hey Adam,

I'm running into the problem described here but maybe I can do a better job of explaining it...

Basically what is happening is that where you actually "click" on the calendar and where an event selection actually starts is inconsistent.  The point the original poster was making was that the inconsistency increases as you get further down in the calendar (as you go later in the day).

I'm not exactly sure what code might need to be changed in order to fix that, but it does seem like the calculation made to determine the start of the event selection, based on a positional click, would need to be updated.
Dec 29, 2011
#6 albertca...@gmail.com
The code change proposed works perfect, that's what i have in my fullcalendar.sj

        ++slotHeight = slotTableFirstInner.parents('tr').outerHeight() + 1; // +1 for border
        --slotHeight = slotTableFirstInner.height() + 1; // +1 for border

in the setHeight function
May 29, 2012
#7 koosvdk...@gmail.com
Working example of bug http://jsbin.com/iviyeb/edit#javascript,html,live

The slot height is set to 10px by CSS. Try to add an event in weekview at 5pm...

May 31, 2012
#8 koosvdk...@gmail.com
By the way: This worked for me

slotHeight = slotTable.height()/slotCnt;

(In my case, the original slotHeight function returned 11px, whereas in reality, the height was 11.49305555555px. 


Jun 20, 2012
#9 Maldar...@gmail.com
Also for me is correct calculate the height with

slotHeight = slotTable.height()/slotCnt;

It works fine. Tnx a lot
Jul 18, 2013
#11 tonyliuj...@gmail.com

slotHeight = slotTable.height()/slotCnt;

It works perfectly, thx.
Aug 13, 2013
Project Member #12 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Accepted
Labels: -Type-Defect Type-Bug
Aug 13, 2013
Project Member #13 adamrs...@gmail.com
 Issue 1034  has been merged into this issue.
Aug 14, 2013
Project Member #14 adamrs...@gmail.com
 Issue 1149  has been merged into this issue.
Aug 14, 2013
Project Member #15 adamrs...@gmail.com
 Issue 1216  has been merged into this issue.
Aug 14, 2013
Project Member #16 adamrs...@gmail.com
 Issue 1229  has been merged into this issue.
Aug 15, 2013
Project Member #17 adamrs...@gmail.com
 Issue 1430  has been merged into this issue.
Aug 15, 2013
Project Member #18 adamrs...@gmail.com
 Issue 1626  has been merged into this issue.
Aug 15, 2013
Project Member #19 adamrs...@gmail.com
 Issue 1302  has been merged into this issue.
Aug 28, 2013
Project Member #20 adamrs...@gmail.com
(No comment was entered for this change.)
Labels: milestone-1.6.4
Sep 1, 2013
Project Member #22 adamrs...@gmail.com
this has been released v1.6.4
https://github.com/arshaw/fullcalendar/blob/v1.6.4/changelog.txt
Status: Released
Sign in to add a comment

Powered by Google Project Hosting