POV-Ray : Newsgroups : povray.binaries.utilities : New version of Farger.inc Server Time
31 Oct 2024 14:12:23 EDT (-0400)
  New version of Farger.inc (Message 21 to 30 of 40)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Melody
Subject: Re: New version of Farger.inc
Date: 23 Jan 2020 02:15:00
Message: <web.5e294758f66b17949da690110@news.povray.org>
Default off til you need it,
Cb<input type="checkbox" id="clip"/>

And in the function buffer ... there are 2,
which use clipboard();

if (document.getElementById("clip").checked) clipboard();


Post a reply to this message

From: Melody
Subject: Re: New version of Farger.inc
Date: 23 Jan 2020 07:15:00
Message: <web.5e298cd7f66b17949da690110@news.povray.org>
* my 3 global hacks = pickeropen = 1;pickeropen = 0;MYColor = '#'+value;
(Didn't figure a way to access existing state.)

Now it knows what it's doing on top of another layer.
Wont be pulling off uncontrolled double operations.
Was like insulting, heh.


Post a reply to this message


Attachments:
Download 'povcolorselect6.zip' (87 KB)

From: Melody
Subject: Re: New version of Farger.inc
Date: 23 Jan 2020 08:00:00
Message: <web.5e29985ef66b17949da690110@news.povray.org>
so you open and close a picker but didn't set a color. MYColor (not the other 4)
got set anyway, field will be changed unnecessarily for other upClicks.
 more changes...

function mouseUp(e) {
  if (pickeropen) showpicker();
}

function showpicker() {
  if ((MYColor) && (pickeropen)) { /// will move, not set.
}
function mouseDwn() {
  // echo(" ");
}

I mean, if you want something right.
That should be all the bugs from adding 4 pickers that can work on top.

happy coloring.


Post a reply to this message

From: Melody
Subject: Re: New version of Farger.inc
Date: 23 Jan 2020 09:45:01
Message: <web.5e29b088f66b17949da690110@news.povray.org>
too many changes to list,
text area (good for debugging)
color doesn't change without breaking a leg to do it.

changed to text input.
dark color with white text,
light colr with black text.

and all previous changes,
lucky number 7 is here.


Post a reply to this message


Attachments:
Download 'povcolorselect7.zip' (87 KB)

From: Melody
Subject: Re: New version of Farger.inc
Date: 23 Jan 2020 10:40:00
Message: <web.5e29bdc2f66b17949da690110@news.povray.org>
function hsl2rgb(h, s, l) {
....
  echo("That was not a color! hsl2rgb()")
  return [0,0,0];
}

both those functions ought to,
not leave a condition where it could return nothing.
check for out of range input.
and give some heads up.

more to do.


Post a reply to this message

From: Melody
Subject: Re: New version of Farger.inc
Date: 24 Jan 2020 07:40:01
Message: <web.5e2ae51bf66b17949da690110@news.povray.org>
v.8 Changes

comments removed from operations that need speed.
hue error handling.
added variables for decimal output.
clipboard extended to any color set with "Cb" checked.
but unfortunately,
copy event closes the jsPicker layer by focus change. not a bug.
should be clipboard("text")! mirc has it. another case for DIY.
clipboard had to select text. added deselect.

send palette color to Picker,
left mouseClick and ctr = 1, shift = 2, alt = 3rd Picker.

QUIRKS that stick:
open/close/reopen Picker before it gets the new color.

open a Picker, by clicking on text input ...
open another Picker, MYColor is set to previous picker.
 close and reopen same, set to this color.
  down clicks on Picker always set this color.


Post a reply to this message


Attachments:
Download 'povcolorselect8.zip' (89 KB)

From: Melody
Subject: Re: New version of Farger.inc
Date: 24 Jan 2020 07:50:00
Message: <web.5e2ae79ff66b17949da690110@news.povray.org>
"Melody" <nomail@nomail> wrote:
> v.8 Changes
>  close and reopen same, set to this color.
>   down clicks on Picker always set this color.
had I communication skills, I might have said something more clear.

 close and reopen same, Picker set to the sent-color.
  down clicks on Picker always set a new selected color.
quirky.


Post a reply to this message

From: Melody
Subject: Re: New version of Farger.inc
Date: 24 Jan 2020 09:35:01
Message: <web.5e2aff65f66b17949da690110@news.povray.org>
thought it too much find in the maze, I was wrong.

EASY FIX. add this to jscolor.js -
IN function drawPicker(x, y) {
if (valueElement.value) MYColor = '#'+valueElement.value;

opens and gets the new color, yea.

only goofy part is if u open another while one is open.
that case, drawPicker() doesn't seem to fly first time or something.


Post a reply to this message

From: Melody
Subject: Re: New version of Farger.inc
Date: 24 Jan 2020 09:50:01
Message: <web.5e2b0402f66b17949da690110@news.povray.org>
got it! next version maybe. If you cant wait,

move MYColor = '#'+value;

to end of
this.exportColor = function(flags) {

like so ...
MYColor = '#'+value;
this.exportColor(flags);

it was setting, as if closing happened after opening new pricker.

goofy got fixed.


Post a reply to this message

From: Melody
Subject: Re: New version of Farger.inc
Date: 24 Jan 2020 11:25:00
Message: <web.5e2b19bdf66b17949da690110@news.povray.org>
got goofy to take a hike, description for hacking jscolor:

pickeropen = 1;pickeropen = 0;MYColor = '#'+value;
hidePicker() know the state
showPicker() know the state and halt lower layer functions.
fromHSV() only set on new color selection, not on close.
drawPicker() get color on open.
if (valueElement.value) MYColor = '#'+valueElement.value;

script sends new color to text input - update = newpicker();

this way u dont have to know which picker you're using,
when showing results.


Post a reply to this message


Attachments:
Download 'povcolorselect9.zip' (88 KB)

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.