|
|
@ -861,473 +861,191 @@ |
|
|
<script src="js/grapes.min.js"></script> |
|
|
<script src="js/grapes.min.js"></script> |
|
|
<script src="js/grapesjs-plugin-export.min.js"></script> |
|
|
<script src="js/grapesjs-plugin-export.min.js"></script> |
|
|
<script type="text/javascript"> |
|
|
<script type="text/javascript"> |
|
|
var gr = grapesjs.init( |
|
|
|
|
|
{ |
|
|
var lp = './img/'; |
|
|
|
|
|
var plp = 'http://placehold.it/350x250/'; |
|
|
|
|
|
var images = [ |
|
|
|
|
|
lp+'team1.jpg', lp+'team2.jpg', lp+'team3.jpg', plp+'78c5d6/fff/image1.jpg', plp+'459ba8/fff/image2.jpg', plp+'79c267/fff/image3.jpg', |
|
|
|
|
|
plp+'c5d647/fff/image4.jpg', plp+'f28c33/fff/image5.jpg', plp+'e868a2/fff/image6.jpg', plp+'cc4360/fff/image7.jpg', |
|
|
|
|
|
lp+'work-desk.jpg', lp+'phone-app.png', lp+'bg-gr-v.png' |
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
var gr = grapesjs.init({ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
height: '100%', |
|
|
height: '100%', |
|
|
container : '#gjs', |
|
|
container : '#gjs', |
|
|
fromElement: true, |
|
|
fromElement: true, |
|
|
plugins: ['gjs-plugin-export'], |
|
|
plugins: ['gjs-plugin-export'], |
|
|
commands: { |
|
|
|
|
|
defaults : [{ |
|
|
// Define commands |
|
|
id: 'open-github', |
|
|
commands: { |
|
|
run: function(em, sender){ |
|
|
defaults: [{ |
|
|
sender.set('active',false); |
|
|
id: 'open-github', |
|
|
window.open('https://github.com/artf/grapesjs','_blank'); |
|
|
run: function(em, sender){ |
|
|
}, |
|
|
sender.set('active',false); |
|
|
stop: function(){} |
|
|
window.open('https://github.com/artf/grapesjs','_blank'); |
|
|
},{ |
|
|
}, |
|
|
id: 'undo', |
|
|
},{ |
|
|
run: function(em, sender){ |
|
|
id: 'undo', |
|
|
sender.set('active',false); |
|
|
run: function(em, sender){ |
|
|
em.UndoManager.undo(true); |
|
|
sender.set('active',false); |
|
|
}, |
|
|
em.UndoManager.undo(true); |
|
|
stop: function(){} |
|
|
}, |
|
|
},{ |
|
|
},{ |
|
|
id: 'redo', |
|
|
id: 'redo', |
|
|
run: function(em, sender){ |
|
|
run: function(em, sender){ |
|
|
sender.set('active',false); |
|
|
sender.set('active',false); |
|
|
em.UndoManager.redo(true); |
|
|
em.UndoManager.redo(true); |
|
|
}, |
|
|
}, |
|
|
stop: function(){} |
|
|
},{ |
|
|
},{ |
|
|
id: 'clean-all', |
|
|
id: 'clean-all', |
|
|
run: function(em, sender){ |
|
|
run: function(em, sender){ |
|
|
sender.set('active',false); |
|
|
sender.set('active',false); |
|
|
if(confirm('Are you sure to clean the canvas?')){ |
|
|
if(confirm('Are you sure to clean the canvas?')){ |
|
|
var comps = em.DomComponents.clear(); |
|
|
var comps = em.DomComponents.clear(); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
}], |
|
|
stop: function(){} |
|
|
|
|
|
}], |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// Insert some default images |
|
|
assetManager: { |
|
|
assetManager: { |
|
|
storageType : '', |
|
|
assets: images |
|
|
storeOnChange : true, |
|
|
|
|
|
storeAfterUpload : true, |
|
|
|
|
|
assets : [ |
|
|
|
|
|
{ type: 'image', src : './img/team1.jpg',height:100, width:100}, |
|
|
|
|
|
{ type: 'image', src : './img/team2.jpg',height:100, width:100}, |
|
|
|
|
|
{ type: 'image', src : './img/team3.jpg',height:100, width:100}, |
|
|
|
|
|
{ type: 'image', src : 'http://placehold.it/350x250/78c5d6/fff/image1.jpg',height:350, width:250}, |
|
|
|
|
|
{ type: 'image', src : 'http://placehold.it/350x250/459ba8/fff/image2.jpg',height:350, width:250}, |
|
|
|
|
|
{ type: 'image', src : 'http://placehold.it/350x250/79c267/fff/image3.jpg',height:350, width:250}, |
|
|
|
|
|
{ type: 'image', src : 'http://placehold.it/350x250/c5d647/fff/image4.jpg',height:350, width:250}, |
|
|
|
|
|
{ type: 'image', src : 'http://placehold.it/350x250/f28c33/fff/image5.jpg',height:350, width:250}, |
|
|
|
|
|
{ type: 'image', src : 'http://placehold.it/350x250/e868a2/fff/image6.jpg',height:350, width:250}, |
|
|
|
|
|
{ type: 'image', src : 'http://placehold.it/350x250/cc4360/fff/image7.jpg',height:350, width:250}, |
|
|
|
|
|
{ type: 'image', src : './img/work-desk.jpg',height:1080, width:1728}, |
|
|
|
|
|
{ type: 'image', src : './img/phone-app.png', date: '2015-02-01',height:650, width:320}, |
|
|
|
|
|
{ type: 'image', src : './img/bg-gr-v.png', date: '2015-02-01',height:1, width:1728}, |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// Configure Style Manager // 1481 - 1235 |
|
|
styleManager : { |
|
|
styleManager : { |
|
|
sectors: [{ |
|
|
sectors: [{ |
|
|
name: 'General', |
|
|
name: 'General', |
|
|
buildProps: ['float', 'display', 'position', 'top', 'right', 'left', 'bottom'], |
|
|
buildProps: ['float', 'display', 'position', 'top', 'right', 'left', 'bottom'], |
|
|
properties:[{ |
|
|
properties:[{ |
|
|
name : 'Alignment', |
|
|
name: 'Alignment', |
|
|
property : 'float', |
|
|
property: 'float', |
|
|
type : 'radio', |
|
|
type: 'radio', |
|
|
defaults : 'none', |
|
|
defaults: 'none', |
|
|
list : [{ |
|
|
list: [ |
|
|
value : 'none', |
|
|
{ value: 'none', className: 'fa fa-times'}, |
|
|
title : 'None', |
|
|
{ value: 'left', className: 'fa fa-align-left'}, |
|
|
className : 'fa fa-times', |
|
|
{ value: 'right', className: 'fa fa-align-right'} |
|
|
},{ |
|
|
], |
|
|
value : 'left', |
|
|
}, |
|
|
className : 'fa fa-align-left', |
|
|
{ property: 'position', type: 'select'} |
|
|
title : 'Float element to the left', |
|
|
], |
|
|
},{ |
|
|
},{ |
|
|
value : 'right', |
|
|
|
|
|
className : 'fa fa-align-right', |
|
|
|
|
|
title : 'Float element to the right', |
|
|
|
|
|
}], |
|
|
|
|
|
},{ |
|
|
|
|
|
property : 'display', |
|
|
|
|
|
type : 'radio', |
|
|
|
|
|
list : [{ |
|
|
|
|
|
value : 'block', |
|
|
|
|
|
title : 'Block', |
|
|
|
|
|
},{ |
|
|
|
|
|
value : 'inline', |
|
|
|
|
|
title : 'Inline', |
|
|
|
|
|
},{ |
|
|
|
|
|
value : 'inline-block', |
|
|
|
|
|
title : 'Inline-block', |
|
|
|
|
|
},{ |
|
|
|
|
|
value : 'none', |
|
|
|
|
|
title : 'None', |
|
|
|
|
|
className : 'fa fa-eye-slash', |
|
|
|
|
|
}], |
|
|
|
|
|
}], |
|
|
|
|
|
},{ |
|
|
|
|
|
name: 'Dimension', |
|
|
name: 'Dimension', |
|
|
open: false, |
|
|
open: false, |
|
|
buildProps: ['width', 'height', 'max-width', 'min-height', 'margin', 'padding'], |
|
|
buildProps: ['width', 'height', 'max-width', 'min-height', 'margin', 'padding'], |
|
|
properties:[{ |
|
|
properties:[{ |
|
|
name : 'Margin', |
|
|
property: 'margin', |
|
|
property : 'margin', |
|
|
properties:[ |
|
|
type : 'composite', |
|
|
{ name: 'Top', property: 'margin-top'}, |
|
|
properties:[{ |
|
|
{ name: 'Right', property: 'margin-right'}, |
|
|
name : 'Top', |
|
|
{ name: 'Bottom', property: 'margin-bottom'}, |
|
|
property : 'margin-top', |
|
|
{ name: 'Left', property: 'margin-left'} |
|
|
type : 'integer', |
|
|
], |
|
|
units : ['px','%'], |
|
|
},{ |
|
|
defaults : 0, |
|
|
|
|
|
},{ |
|
|
|
|
|
name : 'Right', |
|
|
|
|
|
property : 'margin-right', |
|
|
|
|
|
type : 'integer', |
|
|
|
|
|
units : ['px','%'], |
|
|
|
|
|
defaults : 0, |
|
|
|
|
|
},{ |
|
|
|
|
|
name : 'Bottom', |
|
|
|
|
|
property : 'margin-bottom', |
|
|
|
|
|
type : 'integer', |
|
|
|
|
|
units : ['px','%'], |
|
|
|
|
|
defaults : 0, |
|
|
|
|
|
},{ |
|
|
|
|
|
name : 'Left', |
|
|
|
|
|
property : 'margin-Left', |
|
|
|
|
|
type : 'integer', |
|
|
|
|
|
units : ['px','%'], |
|
|
|
|
|
defaults : 0, |
|
|
|
|
|
},], |
|
|
|
|
|
},/*{ |
|
|
|
|
|
name : 'Center block', |
|
|
|
|
|
property : 'margin', |
|
|
|
|
|
type : 'select', |
|
|
|
|
|
defaults : '0', |
|
|
|
|
|
list : [ |
|
|
|
|
|
{ value: '0', name: 'Normal',}, |
|
|
|
|
|
{ value: '0 auto', name: 'Center',} |
|
|
|
|
|
], |
|
|
|
|
|
},*/{ |
|
|
|
|
|
name : 'Padding', |
|
|
|
|
|
property : 'padding', |
|
|
property : 'padding', |
|
|
type : 'composite', |
|
|
properties:[ |
|
|
properties:[{ |
|
|
{ name: 'Top', property: 'padding-top'}, |
|
|
name : 'Top', |
|
|
{ name: 'Right', property: 'padding-right'}, |
|
|
property : 'padding-top', |
|
|
{ name: 'Bottom', property: 'padding-bottom'}, |
|
|
type : 'integer', |
|
|
{ name: 'Left', property: 'padding-left'} |
|
|
units : ['px','%'], |
|
|
], |
|
|
defaults : 0, |
|
|
}], |
|
|
min : 0, |
|
|
|
|
|
},{ |
|
|
|
|
|
name : 'Right', |
|
|
|
|
|
property : 'padding-right', |
|
|
|
|
|
type : 'integer', |
|
|
|
|
|
units : ['px','%'], |
|
|
|
|
|
defaults : 0, |
|
|
|
|
|
min : 0, |
|
|
|
|
|
},{ |
|
|
|
|
|
name : 'Bottom', |
|
|
|
|
|
property : 'padding-bottom', |
|
|
|
|
|
type : 'integer', |
|
|
|
|
|
units : ['px','%'], |
|
|
|
|
|
defaults : 0, |
|
|
|
|
|
min : 0, |
|
|
|
|
|
},{ |
|
|
|
|
|
name : 'Left', |
|
|
|
|
|
property : 'padding-left', |
|
|
|
|
|
type : 'integer', |
|
|
|
|
|
units : ['px','%'], |
|
|
|
|
|
defaults : 0, |
|
|
|
|
|
min : 0, |
|
|
|
|
|
},], |
|
|
|
|
|
},], |
|
|
|
|
|
},{ |
|
|
},{ |
|
|
name: 'Typography', |
|
|
name: 'Typography', |
|
|
open: false, |
|
|
open: false, |
|
|
buildProps: ['font-family', 'font-size', 'font-weight', 'letter-spacing', 'color', 'line-height', 'text-align', 'text-shadow'], |
|
|
buildProps: ['font-family', 'font-size', 'font-weight', 'letter-spacing', 'color', 'line-height', 'text-align', 'text-shadow'], |
|
|
properties:[{ |
|
|
properties:[ |
|
|
name: 'Font', |
|
|
{ name: 'Font', property: 'font-family'}, |
|
|
property: 'font-family', |
|
|
{ name: 'Weight', property: 'font-weight'}, |
|
|
},{ |
|
|
{ name: 'Font color', property: 'color'}, |
|
|
name: 'Weight', |
|
|
{ |
|
|
property: 'font-weight', |
|
|
property: 'text-align', |
|
|
},{ |
|
|
type: 'radio', |
|
|
name: 'Font color', |
|
|
defaults: 'left', |
|
|
property: 'color', |
|
|
list: [ |
|
|
},{ |
|
|
{ value : 'left', name : 'Left', className: 'fa fa-align-left'}, |
|
|
name : 'Text align', |
|
|
{ value : 'center', name : 'Center', className: 'fa fa-align-center' }, |
|
|
property : 'text-align', |
|
|
{ value : 'right', name : 'Right', className: 'fa fa-align-right'}, |
|
|
type : 'radio', |
|
|
{ value : 'justify', name : 'Justify', className: 'fa fa-align-justify'} |
|
|
defaults : 'left', |
|
|
], |
|
|
list : [{ value : 'left', name : 'Left', className: 'fa fa-align-left'}, |
|
|
},{ |
|
|
{ value : 'center', name : 'Center', className: 'fa fa-align-center' }, |
|
|
property: 'text-shadow', |
|
|
{ value : 'right', name : 'Right', className: 'fa fa-align-right'}, |
|
|
properties: [ |
|
|
{ value : 'justify', name : 'Justify', className: 'fa fa-align-justify'},], |
|
|
{ name: 'X position', property: 'text-shadow-h'}, |
|
|
},{ |
|
|
{ name: 'Y position', property: 'text-shadow-v'}, |
|
|
name : 'Text shadow', |
|
|
{ name: 'Blur', property: 'text-shadow-blur'}, |
|
|
property : 'text-shadow', |
|
|
{ name: 'Color', property: 'text-shadow-color'} |
|
|
type : 'stack', |
|
|
], |
|
|
preview : true, |
|
|
|
|
|
properties : [{ |
|
|
|
|
|
name: 'X position', |
|
|
|
|
|
property: 'h-shadow', |
|
|
|
|
|
type: 'integer', |
|
|
|
|
|
units: ['px','%'], |
|
|
|
|
|
defaults : 0, |
|
|
|
|
|
},{ |
|
|
|
|
|
name: 'Y position', |
|
|
|
|
|
property: 'v-shadow', |
|
|
|
|
|
type: 'integer', |
|
|
|
|
|
units: ['px','%'], |
|
|
|
|
|
defaults : 0, |
|
|
|
|
|
},{ |
|
|
|
|
|
name: 'Blur', |
|
|
|
|
|
property: 'blur-radius', |
|
|
|
|
|
type: 'integer', |
|
|
|
|
|
units: ['px'], |
|
|
|
|
|
defaults : 0, |
|
|
|
|
|
min: 0, |
|
|
|
|
|
},{ |
|
|
|
|
|
name: 'Color', |
|
|
|
|
|
property: 'shadow-color', |
|
|
|
|
|
type: 'color', |
|
|
|
|
|
defaults: 'black', |
|
|
|
|
|
},], |
|
|
|
|
|
}], |
|
|
}], |
|
|
},{ |
|
|
},{ |
|
|
name: 'Decorations', |
|
|
name: 'Decorations', |
|
|
open: false, |
|
|
open: false, |
|
|
buildProps: [ 'background-color', 'border-radius', 'border', 'box-shadow', 'background'], |
|
|
buildProps: [ 'background-color', 'border-radius', 'border', 'box-shadow', 'background'], |
|
|
properties: [{ |
|
|
properties: [{ |
|
|
name : 'Background', |
|
|
property: 'border-radius', |
|
|
property : 'background-color', |
|
|
properties : [ |
|
|
},{ |
|
|
{ name: 'Top', property: 'border-top-left-radius'}, |
|
|
name : 'Border radius', |
|
|
{ name: 'Right', property: 'border-top-right-radius'}, |
|
|
property : 'border-radius', |
|
|
{ name: 'Bottom', property: 'border-bottom-left-radius'}, |
|
|
type : 'composite', |
|
|
{ name: 'Left', property: 'border-bottom-right-radius'} |
|
|
properties : [{ |
|
|
], |
|
|
name : 'Top', |
|
|
|
|
|
property : 'border-top-left-radius', |
|
|
|
|
|
type : 'integer', |
|
|
|
|
|
units : ['px','%'], |
|
|
|
|
|
defaults : 0, |
|
|
|
|
|
min : 0, |
|
|
|
|
|
},{ |
|
|
|
|
|
name : 'Right', |
|
|
|
|
|
property : 'border-top-right-radius', |
|
|
|
|
|
type : 'integer', |
|
|
|
|
|
units : ['px','%'], |
|
|
|
|
|
min : 0, |
|
|
|
|
|
defaults : 0, |
|
|
|
|
|
},{ |
|
|
|
|
|
name : 'Bottom', |
|
|
|
|
|
property : 'border-bottom-left-radius', |
|
|
|
|
|
type : 'integer', |
|
|
|
|
|
units : ['px','%'], |
|
|
|
|
|
min : 0, |
|
|
|
|
|
defaults : 0, |
|
|
|
|
|
},{ |
|
|
|
|
|
name : 'Left', |
|
|
|
|
|
property : 'border-bottom-right-radius', |
|
|
|
|
|
type : 'integer', |
|
|
|
|
|
units : ['px'], |
|
|
|
|
|
min : 0, |
|
|
|
|
|
defaults : 0, |
|
|
|
|
|
},], |
|
|
|
|
|
},{ |
|
|
},{ |
|
|
name : 'Box shadow', |
|
|
property: 'box-shadow', |
|
|
property : 'box-shadow', |
|
|
properties: [ |
|
|
type : 'stack', |
|
|
{ name: 'X position', property: 'box-shadow-h'}, |
|
|
preview : true, |
|
|
{ name: 'Y position', property: 'box-shadow-v'}, |
|
|
properties : [{ |
|
|
{ name: 'Blur', property: 'box-shadow-blur'}, |
|
|
name: 'X position', |
|
|
{ name: 'Spread', property: 'box-shadow-spread'}, |
|
|
property: 'shadow-x', |
|
|
{ name: 'Color', property: 'box-shadow-color'}, |
|
|
type: 'integer', |
|
|
{ name: 'Shadow type', property: 'box-shadow-type'} |
|
|
units: ['px','%'], |
|
|
], |
|
|
defaults : 0, |
|
|
|
|
|
},{ |
|
|
|
|
|
name: 'Y position', |
|
|
|
|
|
property: 'shadow-y', |
|
|
|
|
|
type: 'integer', |
|
|
|
|
|
units: ['px','%'], |
|
|
|
|
|
defaults : 0, |
|
|
|
|
|
},{ |
|
|
|
|
|
name: 'Blur', |
|
|
|
|
|
property: 'shadow-blur', |
|
|
|
|
|
type: 'integer', |
|
|
|
|
|
units: ['px'], |
|
|
|
|
|
defaults : 5, |
|
|
|
|
|
min: 0, |
|
|
|
|
|
},{ |
|
|
|
|
|
name: 'Spread', |
|
|
|
|
|
property: 'shadow-spread', |
|
|
|
|
|
type: 'integer', |
|
|
|
|
|
units: ['px'], |
|
|
|
|
|
defaults : 0, |
|
|
|
|
|
},{ |
|
|
|
|
|
name: 'Color', |
|
|
|
|
|
property: 'shadow-color', |
|
|
|
|
|
type: 'color', |
|
|
|
|
|
defaults: 'black', |
|
|
|
|
|
},{ |
|
|
|
|
|
name: 'Shadow type', |
|
|
|
|
|
property: 'shadow-type', |
|
|
|
|
|
type: 'select', |
|
|
|
|
|
defaults: '', |
|
|
|
|
|
list: [ { value : '', name : 'Outside', }, |
|
|
|
|
|
{ value : 'inset', name : 'Inside', }], |
|
|
|
|
|
}], |
|
|
|
|
|
},{ |
|
|
},{ |
|
|
name : 'Background', |
|
|
property: 'background', |
|
|
property : 'background', |
|
|
properties: [ |
|
|
type : 'stack', |
|
|
{ name: 'Image', property: 'background-image'}, |
|
|
preview : true, |
|
|
{ name: 'Repeat', property: 'background-repeat'}, |
|
|
detached: true, |
|
|
{ name: 'Position', property: 'background-position'}, |
|
|
properties : [{ |
|
|
{ name: 'Attachment', property: 'background-attachment'}, |
|
|
name: 'Image', |
|
|
{ name: 'Size', property: 'background-size'} |
|
|
property: 'background-image', |
|
|
], |
|
|
type: 'file', |
|
|
|
|
|
defaults: 'none', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: 'Repeat', |
|
|
|
|
|
property: 'background-repeat', |
|
|
|
|
|
type: 'select', |
|
|
|
|
|
defaults: 'repeat', |
|
|
|
|
|
list: [{ value : 'repeat', name : 'Repeat', }, |
|
|
|
|
|
{ value : 'repeat-x', name : 'Repeat X', }, |
|
|
|
|
|
{ value : 'repeat-y', name : 'Repeat Y', }, |
|
|
|
|
|
{ value : 'no-repeat', name : 'No repeat', }], |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: 'Position', |
|
|
|
|
|
property: 'background-position', |
|
|
|
|
|
type: 'select', |
|
|
|
|
|
defaults: 'left top', |
|
|
|
|
|
list: [ { value : 'left top',}, |
|
|
|
|
|
{ value : 'left center',}, |
|
|
|
|
|
{ value : 'left bottom',}, |
|
|
|
|
|
{ value : 'right top',}, |
|
|
|
|
|
{ value : 'right center'}, |
|
|
|
|
|
{ value : 'right bottom'}, |
|
|
|
|
|
{ value : 'center top'}, |
|
|
|
|
|
{ value : 'center center'}, |
|
|
|
|
|
{ value : 'center bottom'} |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
},{ |
|
|
|
|
|
name: 'Attachment', |
|
|
|
|
|
property: 'background-attachment', |
|
|
|
|
|
type: 'select', |
|
|
|
|
|
defaults: 'scroll', |
|
|
|
|
|
list: [{ value : 'scroll'}, |
|
|
|
|
|
{ value : 'fixed'}, |
|
|
|
|
|
{ value : 'local'}], |
|
|
|
|
|
},{ |
|
|
|
|
|
name: 'Size', |
|
|
|
|
|
property: 'background-size', |
|
|
|
|
|
type: 'select', |
|
|
|
|
|
defaults: 'auto', |
|
|
|
|
|
list: [{ value : 'auto'}, |
|
|
|
|
|
{ value : 'cover'}, |
|
|
|
|
|
{ value : 'contain'}], |
|
|
|
|
|
}], |
|
|
|
|
|
},], |
|
|
},], |
|
|
},{ |
|
|
},{ |
|
|
name: 'Extra', |
|
|
name: 'Extra', |
|
|
open: false, |
|
|
open: false, |
|
|
buildProps: ['transition', 'perspective', 'transform'], |
|
|
buildProps: ['transition', 'perspective', 'transform'], |
|
|
properties: [{ |
|
|
properties: [{ |
|
|
name: 'Transition', |
|
|
|
|
|
property: 'transition', |
|
|
property: 'transition', |
|
|
type: 'stack', |
|
|
properties:[ |
|
|
preview: false, |
|
|
{ name: 'Property', property: 'transition-property'}, |
|
|
properties:[{ |
|
|
{ name: 'Duration', property: 'transition-duration'}, |
|
|
name: 'Property', |
|
|
{ name: 'Easing', property: 'transition-timing-function'} |
|
|
property: 'transition-property', |
|
|
], |
|
|
type: 'select', |
|
|
|
|
|
defaults: '', |
|
|
|
|
|
list: [{ value : 'all', name : 'All', }, |
|
|
|
|
|
{ value : 'width', name : 'Width', }, |
|
|
|
|
|
{ value : 'height', name : 'Height', }, |
|
|
|
|
|
{ value : 'background-color', name : 'Background', }, |
|
|
|
|
|
{ value : 'transform', name : 'Transform', }, |
|
|
|
|
|
{ value : 'box-shadow', name : 'Box shadow', }, |
|
|
|
|
|
{ value : 'opacity', name : 'Opacity', }], |
|
|
|
|
|
},{ |
|
|
|
|
|
name: 'Duration', |
|
|
|
|
|
property: 'transition-duration', |
|
|
|
|
|
type: 'integer', |
|
|
|
|
|
units: ['s'], |
|
|
|
|
|
defaults : '2', |
|
|
|
|
|
min: 0, |
|
|
|
|
|
},{ |
|
|
|
|
|
name: 'Easing', |
|
|
|
|
|
property: 'transition-timing-function', |
|
|
|
|
|
type: 'select', |
|
|
|
|
|
defaults: 'ease', |
|
|
|
|
|
list: [{ value : 'linear', name : 'Linear', }, |
|
|
|
|
|
{ value : 'ease', name : 'Ease', }, |
|
|
|
|
|
{ value : 'ease-in', name : 'Ease-in', }, |
|
|
|
|
|
{ value : 'ease-out', name : 'Ease-out', }, |
|
|
|
|
|
{ value : 'ease-in-out', name : 'Ease-in-out', }], |
|
|
|
|
|
}], |
|
|
|
|
|
},{ |
|
|
},{ |
|
|
name: 'Transform', |
|
|
|
|
|
property: 'transform', |
|
|
property: 'transform', |
|
|
type: 'composite', |
|
|
properties:[ |
|
|
properties:[{ |
|
|
{ name: 'Rotate X', property: 'transform-rotate-x'}, |
|
|
name: 'Rotate X', |
|
|
{ name: 'Rotate Y', property: 'transform-rotate-y'}, |
|
|
property: 'transform-rotate-x', |
|
|
{ name: 'Rotate Z', property: 'transform-rotate-z'}, |
|
|
type: 'integer', |
|
|
{ name: 'Scale X', property: 'transform-scale-x'}, |
|
|
units: ['deg'], |
|
|
{ name: 'Scale Y', property: 'transform-scale-y'}, |
|
|
defaults : '0', |
|
|
{ name: 'Scale Z', property: 'transform-scale-z'} |
|
|
functionName: 'rotateX', |
|
|
], |
|
|
},{ |
|
|
|
|
|
name: 'Rotate Y', |
|
|
|
|
|
property: 'transform-rotate-y', |
|
|
|
|
|
type: 'integer', |
|
|
|
|
|
units: ['deg'], |
|
|
|
|
|
defaults : '0', |
|
|
|
|
|
functionName: 'rotateY', |
|
|
|
|
|
},{ |
|
|
|
|
|
name: 'Rotate Z', |
|
|
|
|
|
property: 'transform-rotate-z', |
|
|
|
|
|
type: 'integer', |
|
|
|
|
|
units: ['deg'], |
|
|
|
|
|
defaults : '0', |
|
|
|
|
|
functionName: 'rotateZ', |
|
|
|
|
|
},{ |
|
|
|
|
|
name: 'Scale X', |
|
|
|
|
|
property: 'transform-scale-x', |
|
|
|
|
|
type: 'integer', |
|
|
|
|
|
defaults : '1', |
|
|
|
|
|
functionName: 'scaleX', |
|
|
|
|
|
},{ |
|
|
|
|
|
name: 'Scale Y', |
|
|
|
|
|
property: 'transform-scale-y', |
|
|
|
|
|
type: 'integer', |
|
|
|
|
|
defaults : '1', |
|
|
|
|
|
functionName: 'scaleY', |
|
|
|
|
|
},{ |
|
|
|
|
|
name: 'Scale Z', |
|
|
|
|
|
property: 'transform-scale-z', |
|
|
|
|
|
type: 'integer', |
|
|
|
|
|
defaults : '1', |
|
|
|
|
|
functionName: 'scaleZ', |
|
|
|
|
|
}], |
|
|
|
|
|
}] |
|
|
}] |
|
|
},{ |
|
|
},{ |
|
|
name: 'Flex', |
|
|
name: 'Flex', |
|
|
open: false, |
|
|
open: false, |
|
|
properties: [{ |
|
|
properties: [{ |
|
|
name : 'Flex Container', |
|
|
name: 'Flex Container', |
|
|
property : 'display', |
|
|
property: 'display', |
|
|
type : 'select', |
|
|
type: 'select', |
|
|
defaults : 'block', |
|
|
defaults: 'block', |
|
|
list : [{ |
|
|
list: [ |
|
|
value : 'block', |
|
|
{ value: 'block', name: 'Disable'}, |
|
|
name : 'Disable', |
|
|
{ value: 'flex', name: 'Enable'} |
|
|
},{ |
|
|
], |
|
|
value : 'flex', |
|
|
|
|
|
name : 'Enable', |
|
|
|
|
|
}], |
|
|
|
|
|
},{ |
|
|
},{ |
|
|
name: 'Flex Parent', |
|
|
name: 'Flex Parent', |
|
|
property: 'label-parent-flex', |
|
|
property: 'label-parent-flex', |
|
|
@ -1474,28 +1192,28 @@ |
|
|
|
|
|
|
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
// Add extra buttons |
|
|
// Add extra buttons |
|
|
gr.Panels.addButton('options', [{ |
|
|
gr.Panels.addButton('options', [{ |
|
|
id: 'undo', |
|
|
id: 'undo', |
|
|
className: 'fa fa-undo icon-undo', |
|
|
className: 'fa fa-undo icon-undo', |
|
|
command: 'undo', |
|
|
command: 'undo', |
|
|
attributes: { title: 'Undo (CTRL/CMD + Z)'} |
|
|
attributes: { title: 'Undo (CTRL/CMD + Z)'} |
|
|
},{ |
|
|
},{ |
|
|
id: 'redo', |
|
|
id: 'redo', |
|
|
className: 'fa fa-repeat icon-redo', |
|
|
className: 'fa fa-repeat icon-redo', |
|
|
command: 'redo', |
|
|
command: 'redo', |
|
|
attributes: { title: 'Redo (CTRL/CMD + SHIFT + Z)' } |
|
|
attributes: { title: 'Redo (CTRL/CMD + SHIFT + Z)' } |
|
|
},{ |
|
|
},{ |
|
|
id: 'clean-all', |
|
|
id: 'clean-all', |
|
|
className: 'fa fa-trash icon-blank', |
|
|
className: 'fa fa-trash icon-blank', |
|
|
command: 'clean-all', |
|
|
command: 'clean-all', |
|
|
attributes: { title: 'Empty canvas' } |
|
|
attributes: { title: 'Empty canvas' } |
|
|
},{ |
|
|
},{ |
|
|
id: 'view-github', |
|
|
id: 'view-github', |
|
|
className: 'fa fa-github', |
|
|
className: 'fa fa-github', |
|
|
command: 'open-github', |
|
|
command: 'open-github', |
|
|
attributes: { title: 'View on Github' } |
|
|
attributes: { title: 'View on Github' } |
|
|
}]); |
|
|
}]); |
|
|
|
|
|
|
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
|