-
-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix computing video view's width and height when using padding #89
Conversation
/cc @ibc |
lgtm |
Question: how does this work? The video width/height is modified based on the CSS padding, but I do not see the X/Y position of the video being updated. Do I miss something? |
I mean: do |
To be clear:
function getElementPositionAndSize() {
var rect = this.element.getBoundingClientRect();
return {
left: rect.left + this.element.clientLeft,
top: rect.top + this.element.clientTop,
width: this.element.clientWidth,
height: this.element.clientHeight
};
} My concern is: If a
That's the reason of my worry. |
Yep, forgot to take care of that. Will test and fix.
|
@ibc Fixed and tested, can you PTAL? |
Cannot check it now, but: Padding is not added to te CSS width/height when |
|
Fix computing video view's width and height when using padding
According to the MDN docs the padding is included, so substract it.