Fixes and Feature requests
-
Hello,
thanks for the great plugin. I discovered some issues and tried to fix them.
I think
$(this).load();
in js/input.js is deprecated and should be$(this).trigger( 'load' );
.The next issue was, that the canvas did not draw, if the field was inside an closed ACF accordion field. I found the same issue while switching tabs. I solved this using by using the ACF JS-API action ‘show_field’ to draw the canvas again. But this solution is drawing each focal field multiple time, so I hope, you may get a better solution.
Fore a real responsive behavior (cover/ not contain) I stripped out some code parts in focal-point.js:
/*if ( fwidth/oheight > twidth/theight ) { height = oheight*twidth/fwidth; width = owidth*twidth/fwidth; left = -fx1*width; top = (theight-height)/2; } else {*/ // leave the code /* } */
/*if ( fheight/owidth > theight/twidth ) { width = owidth*theight/fheight; height = oheight*theight/fheight; top = -fy1*height; left = (twidth-width)/2; } else {*/ // leave the code /* } */
I also extended the usecase for background images which would be awesome to have in this plugin.
Thanks a lot for your work!
Johann
- The topic ‘Fixes and Feature requests’ is closed to new replies.