Fixed bug where picker opacity appeared wrong
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1803 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -61,7 +61,7 @@ $.jGraduate = {
|
|||||||
Paint:
|
Paint:
|
||||||
function(opt) {
|
function(opt) {
|
||||||
var options = opt || {};
|
var options = opt || {};
|
||||||
this.alpha = options.alpha || 100;
|
this.alpha = isNaN(options.alpha) ? 100 : options.alpha;
|
||||||
// copy paint object
|
// copy paint object
|
||||||
if (options.copy) {
|
if (options.copy) {
|
||||||
this.type = options.copy.type;
|
this.type = options.copy.type;
|
||||||
@@ -605,33 +605,8 @@ jQuery.fn.jGraduate =
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// --------------
|
|
||||||
var thisAlpha = ($this.paint.alpha*255/100).toString(16);
|
|
||||||
while (thisAlpha.length < 2) { thisAlpha = "0" + thisAlpha; }
|
|
||||||
color = $this.paint.solidColor == "none" ? "" : $this.paint.solidColor + thisAlpha;
|
|
||||||
|
|
||||||
$.extend($.fn.jPicker.defaults.window, {
|
|
||||||
alphaSupport: true, effects: {type: 'show',speed: 0}
|
|
||||||
});
|
|
||||||
|
|
||||||
colPicker.jPicker(
|
|
||||||
{
|
|
||||||
window: { title: $settings.window.pickerTitle},
|
|
||||||
images: { clientPath: $settings.images.clientPath },
|
|
||||||
color: { active: color, alphaSupport: true }
|
|
||||||
},
|
|
||||||
function(color) {
|
|
||||||
$this.paint.alpha = color.val('ahex') ? Math.round((color.val('a') / 255) * 100) : 100;
|
|
||||||
$this.paint.solidColor = color.val('hex') ? color.val('hex') : "none";
|
|
||||||
$this.paint.linearGradient = null;
|
|
||||||
okClicked();
|
|
||||||
},
|
|
||||||
null,
|
|
||||||
function(){ cancelClicked(); }
|
|
||||||
);
|
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
|
||||||
// Radial gradient
|
// Radial gradient
|
||||||
(function() {
|
(function() {
|
||||||
var svg = document.getElementById(id + '_rg_jgraduate_svg');
|
var svg = document.getElementById(id + '_rg_jgraduate_svg');
|
||||||
@@ -1029,7 +1004,14 @@ jQuery.fn.jGraduate =
|
|||||||
// --------------
|
// --------------
|
||||||
var thisAlpha = ($this.paint.alpha*255/100).toString(16);
|
var thisAlpha = ($this.paint.alpha*255/100).toString(16);
|
||||||
while (thisAlpha.length < 2) { thisAlpha = "0" + thisAlpha; }
|
while (thisAlpha.length < 2) { thisAlpha = "0" + thisAlpha; }
|
||||||
|
thisAlpha = thisAlpha.split(".")[0];
|
||||||
color = $this.paint.solidColor == "none" ? "" : $this.paint.solidColor + thisAlpha;
|
color = $this.paint.solidColor == "none" ? "" : $this.paint.solidColor + thisAlpha;
|
||||||
|
|
||||||
|
// This should be done somewhere else, probably
|
||||||
|
$.extend($.fn.jPicker.defaults.window, {
|
||||||
|
alphaSupport: true, effects: {type: 'show',speed: 0}
|
||||||
|
});
|
||||||
|
|
||||||
colPicker.jPicker(
|
colPicker.jPicker(
|
||||||
{
|
{
|
||||||
window: { title: $settings.window.pickerTitle },
|
window: { title: $settings.window.pickerTitle },
|
||||||
|
|||||||
Reference in New Issue
Block a user