javascript - How to fit workarea height to fill the screen in Svg-edit? -
it possible set workarea height of svg-edit dynamiccaly fit screen height ? there possibility change workare size in file config.js (for example 640x480, 800x600). how can change workarea fit screen dynamically ? there not important how many pixels workarea has need zoom workarea fit screen. make editor window workarea height fill actual browser screen (zooming disabled, workarea expands whole browser window). possible set using config files or needs som implementation core files ?
here part of config.js:
svgeditor.setconfig({dimensions: [640, 480], emptystorageondecline: true allowedorigins: [window.location.origin] // may 'null' (as string) when used file:// url }); here part of code in svg-editor.html working with:
<div id="workarea"> <style id="styleoverrides" type="text/css" media="screen" scoped="scoped" </style> <div id="svgcanvas" style="position:relative"> </div> </div> 
function getdimensions() { // here height , width values var x = 640, y = 480; return [x,y]; } svgeditor.setconfig({ dimensions: getdimensions() }); if want workarea change user resizes window you'll need bind window.onresize change svg-edit's canvas size using svgcanvas.setresolution().
hopefully helps.
Comments
Post a Comment