~allenap/maas/dev-services-shutdown

« back to all changes in this revision

Viewing changes to src/maasserver/static/js/reveal.js

  • Committer: Tarmac
  • Author(s): Raphael Badin
  • Date: 2012-12-20 12:38:55 UTC
  • mfrom: (1409.2.1 reveal-bug)
  • Revision ID: tarmac-20121220123855-uc4ypmuwzb3frjww
[r=jtv][bug=1092288][author=rvb] Fix computation of height in reveal.js (take margin and padding into account).

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
 * @method _create_slide_out
86
86
 */
87
87
module._create_slide_out = function(node, publisher) {
 
88
    var content_node = node.one('.content');
 
89
    var height = parseInt(content_node.getStyle('height'));
 
90
    var padding_top = parseInt(content_node.getStyle('paddingTop'));
 
91
    var padding_bottom = parseInt(content_node.getStyle('paddingBottom'));
 
92
    var margin_top = parseInt(content_node.getStyle('marginTop'));
 
93
    var margin_bottom = parseInt(content_node.getStyle('marginBottom'));
 
94
    var new_height = (
 
95
        height + padding_top + padding_bottom + margin_top + margin_bottom);
88
96
    var anim = new Y.Anim({
89
97
        node: node,
90
98
        duration: 0.2,
91
 
        to: {height: parseInt(node.one('.content').getStyle('height'))}
 
99
        to: {height: new_height}
92
100
    });
93
101
    anim.on('end', function () {
94
102
        publisher.fire('revealed');