On May 12, P T Withington wrote:
>>> There is one issue that I'd like some input before I make any
>>> changes. Here's the snippet of code:
>>> if (args.height == null &&
>>> typeof(args.$refs.height) != "function") {
>>> ...
>>> } else {
>>> textclip._height = args.height;
>>> }
>>>
[snip]
> I'm not sure I follow the intent of the code here. Is it testing for
> args.height being null, or for it not existing?
Comments are overrated. I think the intent here is that text fields size
to their measured height if none is given; otherwise they clip to their
height. This is different from the way views normally act, but it doesn't
seem like you should have to say
<text height="120" clip="true"
You could probably fix this elegantly by setting clip="true" on the
LzText6.prototype, but that might be some doing. It would be helpful to
just have a version that runs without warnings. You could write:
//TODO: This is a stupid way of saying that a text with set height
//clips
if( args[ "height" ] ...
A
_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev