From c35080bbd47f579b3ef6e0d98561852fd13c35fe Mon Sep 17 00:00:00 2001 From: rsesek Date: Sat, 15 Jul 2006 01:50:36 +0000 Subject: [PATCH] When we run update_swatch(), update the individual RGB swatches as well git-svn-id: svn://depot/macosx/RGBConverter/trunk@236 ad1dcce9-c9fe-0310-b82b-83ea1733dbb0 --- RGB_Converter.wdgt/Widget.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RGB_Converter.wdgt/Widget.js b/RGB_Converter.wdgt/Widget.js index a8ee17a..6c4c0b1 100644 --- a/RGB_Converter.wdgt/Widget.js +++ b/RGB_Converter.wdgt/Widget.js @@ -125,6 +125,9 @@ function update_rgb() function update_swatch() { document.getElementById("swatch").style.backgroundColor = "rgb(" + fields['red'] + ", " + fields['green'] + ", " + fields['blue'] + ")"; + document.getElementById("swatch-red").style.backgroundColor = "rgb(" + fields['red'] + ", 0, 0)"; + document.getElementById("swatch-green").style.backgroundColor = "rgb(0, " + fields['green'] + ", 0)"; + document.getElementById("swatch-blue").style.backgroundColor = "rgb(0, 0, " + fields['blue'] + ")"; } // ################################################################### -- 2.43.5