-Allow users to specify alternate CSS and path information for jGraduate/jPicker via setConfig

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1647 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Jacob Brookover 2010-07-27 20:25:50 +00:00
parent 2642cfd21c
commit d3f14f2d6e
1 changed files with 5 additions and 3 deletions

View File

@ -45,9 +45,11 @@
imgPath: 'images/', imgPath: 'images/',
langPath: 'locale/', langPath: 'locale/',
extPath: 'extensions/', extPath: 'extensions/',
jGraduatePath: 'jgraduate/images/',
extensions: ['ext-markers.js','ext-connector.js', 'ext-eyedropper.js', 'ext-shapes.js', 'ext-imagelib.js'], extensions: ['ext-markers.js','ext-connector.js', 'ext-eyedropper.js', 'ext-shapes.js', 'ext-imagelib.js'],
initTool: 'select', initTool: 'select',
wireframe: false wireframe: false,
colorPickerCSS: null
}, },
uiStrings = Editor.uiStrings = { uiStrings = Editor.uiStrings = {
"invalidAttrValGiven":"Invalid value given", "invalidAttrValGiven":"Invalid value given",
@ -2938,12 +2940,12 @@
var pos = elem.position(); var pos = elem.position();
$("#color_picker") $("#color_picker")
.draggable({cancel:'.jPicker_table,.jGraduate_lgPick,.jGraduate_rgPick'}) .draggable({cancel:'.jPicker_table,.jGraduate_lgPick,.jGraduate_rgPick'})
.css({'left': pos.left, 'bottom': 50 - pos.top}) .css(curConfig.colorPickerCSS || {'left': pos.left, 'bottom': 50 - pos.top})
.jGraduate( .jGraduate(
{ {
paint: paint, paint: paint,
window: { pickerTitle: title }, window: { pickerTitle: title },
images: { clientPath: "jgraduate/images/" } images: { clientPath: curConfig.jGraduatePath }
}, },
function(p) { function(p) {
paint = new $.jGraduate.Paint(p); paint = new $.jGraduate.Paint(p);