History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-5679
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: P0 P0
Assignee: Henry Minsky
Reporter: Maynard Demmon
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

tooltip does not allow explicit control over view placement

Created: 27/Mar/08 01:20 PM   Updated: 27/Mar/08 04:27 PM
Component/s: Components - Incubator
Affects Version/s: Mars
Fix Version/s: Mars

Time Tracking:
Not Specified

Severity: Blocker
Fixed in Change#: 8,459
Runtime: N/A
Fix in hand: True, False


 Description  « Hide
Webtop needs to be able to explicitly control if tooltips show up above or below the mouse location. The existing tooltip class in incubator/tooltip does not allow this. I've provided a diff for changes to that class that add the functionality while maintaining the existing functionality.

41a42,46
> <!--- values = "'above','below',''"
> attribute to control if the tooltip shows up above or below the
> mouse position. Leaving this value empty indicates a best guess
> will be made by the component. -->
> <attribute name="tipvalign" value="" type="string"/>
90d94
< var tipy = this._lastmousey + 25;
98,102c102,122
<
< var pointerontop = true;
< if (tipy > canvas.height - 30) {
< tipy = this._lastmousey - 25;
< pointerontop = false;
---
> var tipy = 0;
> var pointerontop;
> switch (this.tipvalign) {
> case "above":
> tipy = this._lastmousey - 25;
> pointerontop = false;
> break;
>
> case "below":
> tipy = this._lastmousey + 25;
> pointerontop = true;
> break;
>
> default:
> if (tipy > canvas.height - 30) {
> tipy = this._lastmousey - 25;
> pointerontop = false;
> } else {
> tipy = this._lastmousey + 25;
> pointerontop = true;
> }
104c124
<
---
>
121c141
< * Copyright 2006-2007 Laszlo Systems, Inc. All Rights Reserved. *
---
> * Copyright 2006-2008 Laszlo Systems, Inc. All Rights Reserved. *

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Maynard Demmon - 27/Mar/08 01:38 PM
Found an error with the diff provided above. The initial value for tipy should not be 0 to preserver existing functionality. New diff is:

41a42,46
> <!--- values = "'above','below',''"
> attribute to control if the tooltip shows up above or below the
> mouse position. Leaving this value empty indicates a best guess
> will be made by the component. -->
> <attribute name="tipvalign" value="" type="string"/>
90d94
< var tipy = this._lastmousey + 25;
98,102c102,122
<
< var pointerontop = true;
< if (tipy > canvas.height - 30) {
< tipy = this._lastmousey - 25;
< pointerontop = false;
---
> var tipy = this._lastmousey + 25;
> var pointerontop;
> switch (this.tipvalign) {
> case "above":
> tipy = this._lastmousey - 25;
> pointerontop = false;
> break;
>
> case "below":
> tipy = this._lastmousey + 25;
> pointerontop = true;
> break;
>
> default:
> if (tipy > canvas.height - 30) {
> tipy = this._lastmousey - 25;
> pointerontop = false;
> } else {
> tipy = this._lastmousey + 25;
> pointerontop = true;
> }
104c124
<
---
>
121c141
< * Copyright 2006-2007 Laszlo Systems, Inc. All Rights Reserved. *
---
> * Copyright 2006-2008 Laszlo Systems, Inc. All Rights Reserved. *

Amy Muntz - 27/Mar/08 03:27 PM
Henry - please apply this patch and merge to pagan.

Henry Minsky - 27/Mar/08 04:27 PM
changeset r8458 in trunk

changeset 8459 in pagan

Henry Minsky - 27/Mar/08 04:27 PM
fix in trunk at 8458, merged to pagan from trunk at r8459