Labs/Jetpack/Reboot/JEP/102: Difference between revisions

Jump to navigation Jump to search
Line 10: Line 10:


http://img.skitch.com/20100205-pc8ufm5fsqu9tq92gmg2nrrgms.png
http://img.skitch.com/20100205-pc8ufm5fsqu9tq92gmg2nrrgms.png
<pre class="brush:js">
/**
Creates a new simple feature, whose properties are that it has a small 32x32 pixel display, as well as a larger display (that defaults to some size).
@constructor
@param options {object}
  @prop smallView {uri|html|xml}
        This is the small view of the feature.
        uri: A link to the URL of either an icon, or a webpage
        html: A html string that will be shown in the small view
        xml: E4X version of the above
  @prop detailView {uri|html|xml}
        See above descriptions.
  @prop [alwaysDisplayed=true] {bool}
        Used for things that only appear under certain conditions
**/
feature = new require("visual-feature").Feature(options);


* What will it do?
/**
* What does it enable internally/externally?
Event handlers
* How hard is it to implement?
@method
@param eventName {string}
      All of the standard events: click, mouseover, mouseout, mousedown,
      mouseup, keydown, keyup
@param callback {function}
**/
feature.bind( eventName, callback )
 
/**
Remove event handlers. Without any arguments, all bound events are removed.
You can also unbind custom events registered with bind. If the type is
provided, all bound events of that type are removed. If the function that was
passed to bind is provided as the second argument, only that specific event
handler is removed.
@method
@param eventName {string}
@param callback {function}
**/
feature.unbind( eventName, callback )
 
/**
@prop [smallView] {canvas|window}
      If there was a image passed into the constructor this will bea canvas
      you can draw on. It updates the displayed icon in real time. If there
      was a page, then this is a window element.
@prop [detailView] {window}
      A pointer to the detailed view. Changing the width/height of this window
      changes the detail view's total width and height.
**/
feature.property
</pre>
 
* How hard is it to implement? Hard.


=== Key Issues ===
=== Key Issues ===
577

edits

Navigation menu