This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function MySymbol(input){ | |
this.doc = app.activeDocument; | |
this.mySymbolIndex = input || 0; | |
this.mySymbolItem = doc.symbolItems[this.mySymbolIndex]; | |
} | |
MySymbol.prototype.hasSymbolIndex = function() { | |
return this.mySymbolIndex <= this.doc.symbolItems.length - 1; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.preloader = function(options){ | |
var defaults = { | |
delay:200, | |
preload_parent:"a", | |
check_timer:300, | |
ondone:function(){ }, | |
oneachload:function(image){ }, | |
fadein:500 | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function MySymbol(input){ | |
this.doc = app.activeDocument; | |
this.mySymbolIndex = input || 0; | |
this.mySymbolItem = this.hasSymbolIndex() ? this.doc.symbolItems[this.mySymbolIndex] : false; | |
} | |
MySymbol.prototype.hasSymbolIndex = function() { | |
return this.mySymbolIndex <= this.doc.symbolItems.length - 1; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function MySymbol(input){ | |
this.doc = app.activeDocument; | |
this.mySymbolIndex = input || 0; | |
this.mySymbolItem = this.hasSymbolIndex() ? this.doc.symbolItems[this.mySymbolIndex] : false; | |
} | |
MySymbol.prototype.hasSymbolIndex = function() { | |
return this.mySymbolIndex <= this.doc.symbolItems.length - 1; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function CSV(how, exportObjectSize, docName){ | |
this.how = how; // append is default | |
this.exportSize = exportObjectSize; // yes/no | |
this.docName = docName; // file name to export to | |
} | |
CSV.prototype.export = function(input) { | |
var inputFolder = Folder.selectDialog(); | |
var csv = new File(inputFolder+"/"+this.docName+".csv"); | |
// open text again |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MySymbol.prototype.isIn = function(parentItem, runThis) { | |
//var parent = doc.pathItems[0]; | |
var isTrue; | |
var parentVB = parentItem.visibleBounds; | |
var parentLeft = parentVB[0]; | |
var parentTop = -parentVB[1]; //make negative number a positive illustrator measures everything down as negative | |
var parentRight = parentVB[2]; | |
var parentBottom = -parentVB[3]; //make negative number a positive illustrator measures everything down as negative | |
print("parent is : " + parent.name); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////////////////// | |
// | |
// mySymbol class | |
// | |
//////////////////////////////// | |
function rotate90(input){ input.unshift(input.pop()); } //shift array one to right so it follows CSS style borders | |
//accepts layer name or index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#target illustrator | |
//start library | |
// function MyLayer() { } and function SubLayer() are constructor functions | |
function MyLayer(input) { | |
this.doc = app.activeDocument; | |
this.myLayerIndex = input || 0; | |
this.myLayerItem = this.hasLayerIndex() ? this.doc.layers[this.myLayerIndex] : false; | |
this.subLayers = this.myLayerItem.pageItems; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#target illustrator | |
//start library | |
// function MyLayer() { } and function SubLayer() are constructor functions | |
function MyLayer(input) { | |
this.doc = app.activeDocument; | |
this.myLayerIndex = input || 0; | |
this.myLayerItem = this.hasLayerIndex() ? this.doc.layers[this.myLayerIndex] : false; | |
this.subLayers = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//start library | |
function MyLayer(input) { | |
this.doc = app.activeDocument; | |
this.myLayerIndex = input || 0; | |
this.myLayerItem = this.hasLayerIndex() ? this.doc.layers[this.myLayerIndex] : false; | |
this.subLayers = []; | |
//this.visibleBounds = this.myLayerItem.visibleBounds; | |
// push pageItems to SubLayer constructor/class |