Skip to content

Documentation of Mouse Interaction is very incomplete, somehow confusing, and lacks examples #209

Open
@teo1978

Description

@teo1978

http://api.jqueryui.com/mouse/

This part of the documentation needs serious improvement, and/or a corresponding dedicated section in Demos, which does not exist.

  1. (this applies to several methods but I take _mouseStart() as an example)

_mouseStart()Returns: jQuery (plugin only)

The extending widget should implement a _mouseStart() method to handle the beginning of an interaction

=> Explain how the widget author is supposed to implement this method. Because the obvious apparent meaning is that you are expected to implement it in this way:

$.widget("my.widget.name", {
  //....
  //....
  _mouseStart: function() {
    //my definition of the method. e.g.:
    alert("Mouse interaction starting");
    return this;
  }
});

but that's not the case, as this way the method won't ever be called.

The same applies to all the other methods of this part of the api (_mouseCapture, _mouseStop, _mouseDrag...)

  1. The following can be seen in the documentation of most of these methods:

This method will receive the mouse event associated with the start of the interaction.

  • This method does not accept any arguments.

There's an apparent contraddiction there.

  1. Code examples. The current code examples are completely useless. Most (or all) examples are like this:

Code examples:
Invoke the _mouseStart method:

$( ".selector" ).mouse( "_mouseStart" );

That or no example at all is the same. A useful example would be an example implementation of the method, rather than an example of calling it which is something you wouldn't usually do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions