benbyf Posted June 23, 2016 Share Posted June 23, 2016 Hey, I'm pulling my hair out abit with CKeditor settings (documentation is impregnable), I'm trying to set the default width x height in the image modal to the same as the original image by default, not some random number which it seems to be currently. is this possible? Link to comment Share on other sites More sharing options...
LostKobrakai Posted June 23, 2016 Share Posted June 23, 2016 It's not random, but scaled to the modal window. Look for the $maxImageWidth property usage here: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Process/ProcessPageEditImageSelect/ProcessPageEditImageSelect.module Link to comment Share on other sites More sharing options...
benbyf Posted June 23, 2016 Author Share Posted June 23, 2016 Thanks! I've changed to 2000 protected $maxImageWidth = 2000; however, doesn't seem to change, do these setting get added to the DB? or could it be a caching issue? Link to comment Share on other sites More sharing options...
benbyf Posted June 23, 2016 Author Share Posted June 23, 2016 Got a feeling Its probably in the .Js is there a reason why this was done this way, and maybe this could be a setting that could be changed with the module (although i dond tknow if thats something thats been added to image processing in PW3) Link to comment Share on other sites More sharing options...
LostKobrakai Posted June 23, 2016 Share Posted June 23, 2016 Changing the value does only change the "maximum", but not the actual used value. That's why I said you should look for the places where the property is used. There you can find the actual process of determining the size of the image. Link to comment Share on other sites More sharing options...
benbyf Posted June 23, 2016 Author Share Posted June 23, 2016 Christ, I've just done some serious needle in a haystack work. I found the function that fires in teh frontend in JS: if($img.attr('data-fit')) { fitImageToWindow(); } else { $container.width($img.width()).height($img.height()); } commenting out fitImageToWindow(); works but as the file is minified already I also commented out r() on col 1:8630 of the minifed file to get results straight away: so now the image simply doesnt resize to the size of th window (which personally I feel was an odd choice) 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now