Events
PLT widget Events
- onSave()
- onClose()
onSave(data)
Trigerred after design is saved. - data
- Type: Object
data: {
"message":"Design saved successfully",
"data":{
"design":"http://202.79.33.217:9095/api/assetServer/design/?clientId=a9343313-5992-473a-aed2-71b358bfacf3&image=design-1512709172539.png",
"design_id": "1002713435602",
"imprint_id": "10030901_1_1175_43",
"logos":[{
"svg":"http://202.79.33.217:9095/api/assetServer/design/?clientId=a9343313-5992-473a-aed2-71b358bfacf3&image=logo-1512709169058.svg",
"png":"http://202.79.33.217:9095/api/assetServer/design/?clientId=a9343313-5992-473a-aed2-71b358bfacf3&image=logo-1512709169058.png",
"original":"http://202.79.33.217:9095/api/assetServer/design/?clientId=a9343313-5992-473a-aed2-71b358bfacf3&image=logo-1512709169058.cdr"
}]}
}
message
- Type: string
Status
data
- design
- Type: String
Url to Final design image (PNG)
- Type: String
- design_id
- Type: String
Design Id, this should be used to retrieve product design later on
- Type: String
- imprint_id
- Type: String
The product decoration Id
- Type: String
- logos
- Type: Array
- svg : path to svg
- png : path to png
- orignal : path to original logo file
- Type: Array
Code Example
var myLogoTool = new LogoTool({
clientId: 'your-client-id',
onSave: function(data) {
// Save design_id in your database
// Display design image on your page
}
});
onClose()
Trigerred when the designer modal is closed. It takes no parameters.
var myLogoTool = new LogoTool({
clientId: 'your-client-id',
onClose: function() {
// Close trigerred
console.log('Designer modal closed');
}
});