Commit 599eeea2 authored by Andrew Nicols's avatar Andrew Nicols
Browse files

Merge branch 'MDL-51190-28' of https://github.com/pauln/moodle into MOODLE_28_STABLE

parents 606cf274 add6322e
......@@ -343,8 +343,7 @@ M.util.init_maximised_embed = function(Y, id) {
};
var resize_object = function() {
obj.setStyle('width', '0px');
obj.setStyle('height', '0px');
obj.setStyle('display', 'none');
var newwidth = get_htmlelement_size('maincontent', 'width') - 35;
if (newwidth > 500) {
......@@ -360,13 +359,16 @@ M.util.init_maximised_embed = function(Y, id) {
newheight = 400;
}
obj.setStyle('height', newheight+'px');
obj.setStyle('display', '');
};
resize_object();
// fix layout if window resized too
window.onresize = function() {
resize_object();
};
Y.use('event-resize', function (Y) {
Y.on("windowresize", function() {
resize_object();
});
});
};
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment