[Laszlo-checkins] r10764 - openlaszlo/trunk/WEB-INF/lps/lfc/services
bargull@openlaszlo.org
bargull at openlaszlo.org
Mon Aug 25 08:17:09 PDT 2008
Author: bargull
Date: 2008-08-25 08:17:02 -0700 (Mon, 25 Aug 2008)
New Revision: 10764
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/services/LzUtils.lzs
Log:
Change 20080824-bargull-uBy by bargull at dell--p4--2-53 on 2008-08-24 22:59:26
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: add optional arg to LzUtilsClass#inttohex(..)
New Features:
Bugs Fixed: LPP-6740
Technical Reviewer: max
QA Reviewer: ptw
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Changed the second argument of "inttohex()" and "dectohex()" to be optional.
Tests:
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/services/LzUtils.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/services/LzUtils.lzs 2008-08-25 10:35:00 UTC (rev 10763)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/services/LzUtils.lzs 2008-08-25 15:17:02 UTC (rev 10764)
@@ -65,18 +65,17 @@
}
// Converts a floating point rgb.0a to a CSS #RRGGBBAA string
- public function inttohex(n:*, p:*) {
+ public function inttohex(n:*, p:int = 6) {
var s = lz.Utils.stringToColor(n);
if (typeof s != 'number') return s;
// default to 6 characters of padding
- return '#' + this.dectohex(s, 6);
+ return '#' + this.dectohex(s, p);
}
// Converts a decimal number to hexadecimal with padding
- public function dectohex(n:*, p:*) {
+ public function dectohex(n:*, p:int = 0) {
if (typeof n != 'number') return n;
- p = p ? p : 0;
n = n & 0xffffff;
var hex = n.toString(16);
More information about the Laszlo-checkins
mailing list