Answered
Upload zone ends up inside another upload zone(?)
Hi!
We're using the jquery FPD and uses setupProducts() to create the interface from a JSON-object. The object is posted below, can anyone see any errors in it?
The excepted scenario for this test was:
One page, two upload zones, no text.
What happens is:
- only one upload zone shows
- the undo is loaded and active, when clicking undo, the other upload zone replaces the original one (it's slightly smaller, so it's possible to spot) in the same position
- when clicking redo after clicking undo removes the upload zone(s), clicking undo again reinserts it
[ [ { "productTitle":"Jul, 403880", "productThumbnail":"images/product_config/403880/th_403880_1.png", "title":"Side 1", "thumbnail":"images/product_config/403880/th_403880_1.png", "options":{ "stageWidth":1713, "stageHeight":1713, "customAdds":{ "uploads":true, "texts":false, "designs":false } }, "elements":[ { "type":"image", "title":"bakgrunnsbilde", "source":"images/product_config/403880/403880_1.png", "parameters":{ "autoCenter":true, "angle":0, "left":0, "top":0, "scaleX":1, "scaleY":1, "sku":"1_bg" } }, { "type":"image", "title":"image1", "source":"images/product_config/403880/page1/i_page_1_6c02cb.png", "parameters":{ "sku":"elm_4702", "angle":0, "left":599, "top":450, "fill":false, "scaleX":1, "scaleY":1, "locked":false, "uploadZone":true, "uploadZoneMovable":false, "originX":"center", "originY":"center", "removable":false, "draggable":true, "rotatable":false, "resizable":true, "zChangeable":false, "topped":false, "autoSelect":false, "replace":true, "scaleMode":"cover", "adds_uploads":true, "autoCenter":false, "uniScalingUnlockable":false, "customAdds":{ "uploads":true } } }, { "type":"image", "title":"image2", "source":"images/product_config/403880/page1/i_page_1_89d87e.png", "parameters":{ "sku":"elm_4703", "angle":0, "left":1300, "top":1000, "fill":false, "scaleX":1, "scaleY":1, "locked":false, "uploadZone":true, "uploadZoneMovable":false, "originX":"center", "originY":"center", "removable":false, "draggable":true, "rotatable":false, "resizable":true, "zChangeable":false, "topped":false, "autoSelect":false, "replace":true, "scaleMode":"cover", "adds_uploads":true, "autoCenter":false, "uniScalingUnlockable":false, "customAdds":{ "uploads":true } } } ] } ] ]
The javascript for loading the product:
$productWrapper = jQuery('.fpd-product'); fpd = new FancyProductDesigner($("#ksproduct"), opts); $selector = $('#ksproduct'); $selector .on('ready', function() { fpd.setupProducts(fpdProductsJSON); });
The html:
<div id="bcwrap" style="width:780px;text-align:left;margin-top:5px;margin-bottom:20px"> <div id="ksproduct" class="fpd-container fpd-shadow-1 fpd-topbar fpd-top-actions-centered fpd-bottom-actions-centered fpd-views-outside"> </div> </div>
Anyone has any suggestions?
Regards,
knutm :-)
Found the solution
"replace":true,
should be
"replace":false,