malsup / blockui

jQuery BlockUI Plugin
http://jquery.malsup.com/block/
1.69k stars 506 forks source link

Positioning in table cell fails #39

Closed Anticom closed 12 years ago

Anticom commented 12 years ago

When trying to apply .block() method to a table cell, the positioning seems to fail.

Used jQ 1.8.0 blockUI 2

Let me know if you need an example.

malsup commented 12 years ago

That's not supported.

Anticom commented 12 years ago

I don't want to be offensive in any way. I know how much work and efford goes in such projects. However it should easily be possible to support that by scaling the overlay to (pseudo-code since i haven't realy looked at the SC yet):

//$e represents the jQuery object the overlay should be applied to e.g. $('td#myCell')
var x1 = $e.position().left;
var y1 = $e.position().top;
var x2 = $e.outerWidth(true);
var y2 = $e.outerHeight(true);

overlay.css({
  'position': 'absolute'
  'left': x1,
  'top': y1,
  'width': x2,
  height: y2
});

Please correct me, if I'm wrong. If i find the time, I'll have a look at the source code myself soon.

Regards, Timo