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

Offen
#209 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Dokumentation
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
javascript, jquery
Bereich
documentation

Rechercherichtung

Beginne mit der API-Seite zur Mausinteraktion unter http://api.jqueryui.com/mouse/ und überprüfe die Einträge zu _mouseCapture, _mouseStart, _mouseDrag und _mouseStop sowie deren vorhandene Beispiele. Als abgeschlossen gilt die Aufgabe, wenn geklärt ist, wie Widget-Autoren diese Hooks implementieren, die Event-Argumente dokumentiert sind und Beispiele, die nur Aufrufe zeigen, durch nützliche Implementierungsbeispiele oder einen verlinkten Demo-Abschnitt ersetzt wurden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
HTML
Sterne
73
Forks
75
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus jquery/api.jqueryui.com

Alle Issues in jquery/api.jqueryui.com

Ähnliche Issues

Weitere Issues zu Documentation

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.