Code:
var importLayers = {
background: {
layerType: 'background',
index: 0,
layerContent: {
content: function() {
return $(element).find('#background_Content');
},
width: 850,
height: 530,
xPos: 0,
yPos: -150,
skewX: 0,
skewY: 0,
angle: 0,
originX: function() { return (this.sWidth() / 2); },
originY: function() { return (this.sHeight() / 2); },
scaleX: 1,
scaleY: 1,
sWidth: function() { return this.width * this.scaleX; },
sHeight: function() { return this.height * this.scaleY; },
aspect: 0,
opacity: 100,
val: function(prop, val) {
switch(prop)
{
case 'width':
if(plugin.constrain)
this.scaleX = this.scaleY = val / this.width;
else
this.scaleX = val / this.width;
break;
case 'height':
if(plugin.constrain)
this.scaleY = this.scaleX = val / this.height;
else
this.scaleY = val / this.height;
break;
case 'angle':
this.angle = val;
}
buildTransformation(this, this.content());
}
},
},
photo1: {
layerType: 'photo',
index: 1,
layerContent: {
content: function() {
return $(element).find('#photo1_Content');
},
width: 1920,
height: 1280,
xPos: 0,
yPos: 0,
skewX: 0,
skewY: 0,
angle: 0,
originX: function() { return (this.sWidth() / 2); },
originY: function() { return (this.sHeight() / 2); },
scaleX: .15625,
scaleY: .15625,
sWidth: function() { return this.width * this.scaleX; },
sHeight: function() { return this.height * this.scaleY; },
aspect: 0,
opacity: 100,
val: function(prop, val) {
switch(prop)
{
case 'width':
if(plugin.constrain)
this.scaleX = this.scaleY = val / this.width;
else
this.scaleX = val / this.width;
break;
case 'height':
if(plugin.constrain)
this.scaleY = this.scaleX = val / this.height;
else
this.scaleY = val / this.height;
break;
case 'angle':
this.angle = val;
}
buildTransformation(this, this.content());
}
},
}
}
Bookmarks