Changeset 3277993
- Timestamp:
- 04/21/2025 09:07:22 AM (12 months ago)
- Location:
- hangit/trunk
- Files:
-
- 6 edited
-
CHANGELOG.md (modified) (1 diff)
-
CHANGELOG_verbose.md (modified) (1 diff)
-
VERSION (modified) (1 diff)
-
assets/vanillabean.min.js (modified) (1 diff)
-
hangit.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
hangit/trunk/CHANGELOG.md
r3277970 r3277993 1 ## 3.0.1 21 ## 3.0.13 2 2 21 April 2025 3 3 4 - minified js 4 5 - Fix to missign variables 5 6 - Fix to buttons -
hangit/trunk/CHANGELOG_verbose.md
r3277970 r3277993 1 ## 3.0.1 21 ## 3.0.13 2 2 21 April 2025 (Monday) 3 3 4 - minified js (Mark Pottie) 4 5 - Fix to missign variables (Mark Pottie) 5 6 - Fix to buttons (Mark Pottie) -
hangit/trunk/VERSION
r3277970 r3277993 1 3.0.1 21 3.0.13 -
hangit/trunk/assets/vanillabean.min.js
r1585487 r3277993 1 2 var wh=[];jQuery(document).ready(function(e){function c(h){logd("","changeroom");if(e(h).attr("id")=="choosemyownroom"){e("#myroom").trigger("click")}else{var g=e(h).find("img").first();if(g!==null){var f=document.getElementById("the-showroom-backgroundimg");f.src=e(g).attr("src");logd("room found: "+e(g).attr("src"),g)}else{logd("Form","form??")}}}function d(){logd("","InitializeShowroomPage");var h=600;var f=550;var g=jQuery(window).width();var k=jQuery(window).height();if(g<h){h=g}if(k<f){f=k}e("#hangerlink").attr("href","#TB_inline?width="+h+"&height="+f+"&inlineId=showroombox");var j=e("#theframe");var i=e(j).parent();e("<img/>").attr("src",e("#thehanging").attr("src")).load(function(){console.log("start hanging");wh=[this.width,this.height];var n=wh[0]/wh[1];logd("","fixedratio:"+n);var l=parseInt(e(i).width()*0.4);var p=l/wh[0];var o=parseInt(wh[1]*p);logd("Ratio:",p);var m=(e(i).width()-l)/2;e("#theframe").draggable();e("#theframe").resizable({aspectRatio:wh[0]/wh[1]})})}function a(){logd("","InitializeShowroom");logd("Host:",document.location.host);var l=e("#theframe");var k=e(l).parent();var j=e("#the-showroom-backgroundimg");var f=parseInt(e(k).width()*0.4);var i=f/wh[0];var h=parseInt(wh[1]*i);console.log(i);var g=(e(k).width()-f)/2;e(l).css({position:"absolute",left:g,top:40,width:f,height:h})}d();e("#hangerlink").on("click touchend",function(f){setTimeout(function(){a()},500)});function b(i){if(i.files&&i.files[0]){logd("file",i.files);var h=i.files[0].type;logd("type:",h);var g=(h.toLowerCase().indexOf("image")==0);if(g){var f=new FileReader();f.onload=function(j){e("#the-showroom-backgroundimg").attr("src",j.target.result)};f.readAsDataURL(i.files[0])}}}e("#myroom").change(function(){b(this)});e("div.showroom-roomchoice").on("click touchend",function(f){c(this)})}); 1 var wh=[];function vbean_changeroom(obj){logd("","changeroom");if(jQuery(obj).attr("id")=="choosemyownroom"){jQuery("#myroom").trigger("click");return}var thisimg=jQuery(obj).find("img").first();if(!thisimg.length){logd("No image found in clicked element","");return}var thebg=jQuery(".showroom-background-img");if(!thebg.length){logd("Background image element not found","");return}var newSrc=thisimg.attr("src");if(newSrc){thebg.attr("src",newSrc);logd("Room changed to: "+newSrc,"")}}jQuery(document).ready((function($){function initializeShowroomPage(){logd("","InitializeShowroomPage");var tbwidth=600;var tbheight=550;var winw=jQuery(window).width();var winh=jQuery(window).height();if(winw<tbwidth){tbwidth=winw}if(winh<tbheight){tbheight=winh}$("#hangerlink").attr("href","#TB_inline?width="+tbwidth+"&height="+tbheight+"&inlineId=showroombox");var tf=$("#theframe");if(!tf.length){logd("Frame element not found","");return}var theparent=$(tf).parent();if(!theparent.length){logd("Parent element not found","");return}var img=new Image;var imgSrc=$(tf).attr("src");if(!imgSrc){logd("No source found for frame","");return}img.src=imgSrc;img.onload=function(){console.log("Image loaded successfully: "+img.width+"x"+img.height);wh=[img.width,img.height];var fixedratio=wh[0]/wh[1];logd("","fixedratio:"+fixedratio);var nw=parseInt($(theparent).width()*.4);var ratio=nw/wh[0];var nh=parseInt(wh[1]*ratio);logd("Ratio:",ratio);$(tf).width(nw);$(tf).height(nh);$(tf).css({position:"absolute",cursor:"move"});var x=($(theparent).width()-$(tf).width())/2;var y=($(theparent).height()-$(tf).height())/2;$(tf).css({top:y,left:x})};jQuery(".showroom-roomchoice").off("click").on("click",(function(){vbean_changeroom(this)}))}function initializeShowroom(){logd("","InitializeShowroom");logd("Host:",document.location.host);var tf=$("#theframe");var theparent=$(tf).parent();var theimage=$("#the-showroom-backgroundimg");var nw=parseInt($(theparent).width()*.4);var ratio=nw/wh[0];var nh=parseInt(wh[1]*ratio);console.log(ratio);var theleft=($(theparent).width()-nw)/2;$(tf).css({position:"absolute",left:theleft,top:40,width:nw,height:nh})}initializeShowroomPage();$("#hangerlink").on("click touchend",(function(e){setTimeout((function(){initializeShowroom()}),500)}));function showMyRoom(input){if(input.files&&input.files[0]){logd("file",input.files);var ftype=input.files[0].type;logd("type:",ftype);var isimg=ftype.toLowerCase().indexOf("image")==0;if(isimg){var reader=new FileReader;reader.onload=function(e){var backgroundImg=$("#the-showroom-backgroundimg");if(backgroundImg.length){backgroundImg.attr("src",e.target.result)}else{logd("Background image element not found for local upload","")}};reader.readAsDataURL(input.files[0])}}}$("#myroom").change((function(){showMyRoom(this)}));$("div.showroom-roomchoice").on("click touchend",(function(e){vbean_changeroom(this)}))})); -
hangit/trunk/hangit.php
r3277970 r3277993 5 5 Plugin URI: http://www.velvary.com.au/vanilla-beans/wordpress/hangit 6 6 Description: Addon for products and posts that would benefit from their featured image being dragged and resized onto background images 7 Version: 3.0.1 27 Version: 3.0.13 8 8 Author: vsmash 9 9 Author URI: http://www.velvary.com.au … … 28 28 } 29 29 if (!defined('VBEANHANGIT_PLUGIN_VERSION')) { 30 define('VBEANHANGIT_PLUGIN_VERSION','3.0.1 2');30 define('VBEANHANGIT_PLUGIN_VERSION','3.0.13'); 31 31 } 32 32 -
hangit/trunk/readme.txt
r3277970 r3277993 5 5 Requires at least: 4.1 6 6 Tested up to: 6.8 7 Stable tag: 3.0.1 27 Stable tag: 3.0.13 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.