File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 269269
270270 if ( params . height ) {
271271 iframeHeight = parseInt ( params . height ) ;
272+ if ( / \% $ / . test ( params . height ) ) {
273+ iframeWidth = document . getElementById ( id ) . offsetWidth * ( parseInt ( params . height ) / 100 ) ;
274+ }
272275 }
273276
274277 if ( params . width ) {
275278 iframeWidth = parseInt ( params . width ) ;
279+ if ( / \% $ / . test ( params . width ) ) {
280+ iframeWidth = document . getElementById ( id ) . offsetWidth * ( parseInt ( params . width ) / 100 ) ;
281+ }
276282 }
277283
278284 iframe . width = iframeWidth ;
Original file line number Diff line number Diff line change 269269
270270 if ( params . height ) {
271271 iframeHeight = parseInt ( params . height ) ;
272+ if ( / \% $ / . test ( params . height ) ) {
273+ iframeWidth = document . getElementById ( id ) . offsetWidth * ( parseInt ( params . height ) / 100 ) ;
274+ }
272275 }
273276
274277 if ( params . width ) {
275278 iframeWidth = parseInt ( params . width ) ;
279+ if ( / \% $ / . test ( params . width ) ) {
280+ iframeWidth = document . getElementById ( id ) . offsetWidth * ( parseInt ( params . width ) / 100 ) ;
281+ }
276282 }
277283
278284 iframe . width = iframeWidth ;
Original file line number Diff line number Diff line change 11{
22 "name" : " ezuikit-js" ,
3- "version" : " 0.2.8 " ,
3+ "version" : " 0.2.9 " ,
44 "description" : " ezuikit javascript for npm" ,
55 "main" : " ezuikit.js" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments