Show cool things you have done with our products


Post by mats »

I think you should constrain it to the entire browser window, not the container of the schedulerpanel. This is because the eventEditor renders itself to the body tag.

Post by omermx »

Someone on the forum recommends using:
var xy = el.getAlignToXY(otherEl, 'tl-bl?', [0,0]);
To determine coords to pass to the show function...

But it doesn't work at all, makes the form appear way off the grid el.

Post by mats »

Sorry for not being able to help out right now, kind of swamped with work at the moment. If you can't find a good solution I will look into this when I have more time, please keep me updated with your progress though and let me know if I can help :)

Post by omermx »

Ok quick question, where in the Ext API is the documentation for el.anchorTo, getConstrainToXY etc, I can't find it at all.

Post by mats »

Navigate to Ext.Element in the API, it has the 'anchorTo' method. getConstrainToXY seems to be a private method, so you'll have to look it up in the source file I guess.

Post by omermx »

I'm sure there's a more elegant solution, but I finally cracked it...also set animations to false, it's more practical that way.

So Mats, seeing as I helped you improve your product how about a free ext-scheduler Developer license for my efforts???!! :lol:

Thanks.
...
    getConstrainOffsets : function(eventEl) {

        	var a = eventEl.getAnchorXY('bl'); // get xy for bl of eventEl
		var b = this.container.getAnchorXY('bl'); // get xy for bl of container
                var c = b[1] - a[1]; // sum difference 
			
			if(c <= this.height )
			{            
		      // if height is too large to be accomodated, offset i.e appear above eventEl.
			  this.slideAnchor = 'b';
			  return[0,-(this.height+92)];
			  
			}
			else
			{ 	
			  this.slideAnchor = 't';	
			  return [0,0];	
			}
 
    },
...

Post by mats »

Hey, good progress. Should probably take into account the horizontal issue too, if the panel doesn't fit horizontally.

Great work so far :)

Post Reply