StickyWin.ui.pointy

docs

Similar to StickyWin.ui, this shortcut wraps your content with a default layout, the only difference being that this one has a pointer that points in the direction you specify. So, for instance:

document.id('su_pointy1').adopt(
  StickyWin.ui.pointy('A caption', 'Some body text. We\'ll make this long enough so it wraps so we can get a look at the tip a little taller than its minimum size.')
);
execute this code

Themes

This class ships with two themes (you can define your own - see the docs). The default dark one (see example above) and a light grey one:

document.id('su_pointy2').adopt(
  StickyWin.ui.pointy('A caption', 'Some body text. We\'ll make this long enough so it wraps so we can get a look at the tip a little taller than its minimum size.', {
    theme: 'light'
  })
);
execute this code

Pointer Direction

The pointy ui has a pointer that points up, down, left, or right. The direction option can be these directions ("up", "down", "left", or "right") or an integer between 1 and 12. These represent the positions of the hours on a clock. So direction 12 points straight up, while position 1 points up but the pointer is on the upper right corner. This goes all the way around the tip, so 5 points down with the pointer on the bottom right corner of the tip. If you pass in "up" it translates to 12. "left" is 9, "right" is 3, and "down" is 6.

document.id('su_pointy3').adopt(
  StickyWin.ui.pointy('A caption', 'Some body text. We\'ll make this long enough so it wraps so we can get a look at the tip a little taller than its minimum size.', {
    direction: 12 /*same as 'up'*/
  })
);
execute this code

document.id('su_pointy4').adopt(
  StickyWin.ui.pointy('A caption', 'Some body text. We\'ll make this long enough so it wraps so we can get a look at the tip a little taller than its minimum size.', {
    direction: 1
  })
);
execute this code

document.id('su_pointy5').adopt(
  StickyWin.ui.pointy('A caption', 'Some body text. We\'ll make this long enough so it wraps so we can get a look at the tip a little taller than its minimum size.', {
    direction: 2
  })
);
execute this code

document.id('su_pointy6').adopt(
  StickyWin.ui.pointy('A caption', 'Some body text. We\'ll make this long enough so it wraps so we can get a look at the tip a little taller than its minimum size.', {
    direction: 3 /*same as right*/
  })
);
execute this code

document.id('su_pointy7').adopt(
  StickyWin.ui.pointy('A caption', 'Some body text. We\'ll make this long enough so it wraps so we can get a look at the tip a little taller than its minimum size.', {
    direction: 8
  })
);
execute this code

document.id('su_pointy8').adopt(
  StickyWin.ui.pointy('A caption', 'Some body text. We\'ll make this long enough so it wraps so we can get a look at the tip a little taller than its minimum size.', {
    direction: 10
  })
);
execute this code

document.id('su_pointy9').adopt(
  StickyWin.ui.pointy('A caption', 'Some body text. We\'ll make this long enough so it wraps so we can get a look at the tip a little taller than its minimum size.', {
    direction: 11
  })
);
execute this code

you get the idea.

clientcide-libraries/07-ui/10.1-stickywin.ui.pointy.txt · Last modified: 2011/06/20 21:06