Skip to content

Commit 0ad20ec

Browse files
committed
Removes refreshInfo from height calculation onResize
Fixes #23
1 parent 720c3c3 commit 0ad20ec

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

swagger/swagger.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,9 @@
117117
onpaletteadd: function() {
118118
//setup swagger-ui
119119
var swaggerUi;
120-
var refreshInfoHeight = 75;
121120
var content = $("<div/>",{
122121
id:"tab-swagger-ui", style:"position: relative; padding: 0px 4px; height: 100%; overflow: hidden"
123122
});
124-
var refreshInfo = $("<div/>", {
125-
style:"height: "+ refreshInfoHeight + "px; margin: 5px; text-align: center"
126-
});
127123

128124
RED.events.on("deploy",function() {
129125
if (swaggerUi) {
@@ -146,9 +142,9 @@
146142
swaggerFrame.load(function(){
147143
swaggerUi = document.getElementById('swagger-ui-frame').contentWindow.swaggerUi;
148144
window.addEventListener('resize', function(event){
149-
swaggerFrame.css('height', content.height() - refreshInfoHeight - 45);
145+
swaggerFrame.css('height', content.height());
150146
});
151-
swaggerFrame.css('height', content.height() - refreshInfoHeight - 45);
147+
swaggerFrame.css('height', content.height());
152148
swaggerUi.load();
153149
});
154150
},

0 commit comments

Comments
 (0)