Commit Graph
14170 Commits
Author SHA1 Message Date
Matthias Hild 00c2478e98 Transition.styleTween has incorrect signature
The signature of Transition.styleTween is currently:

styleTween(name: string, tween: (datum: Datum, index: number, attr: string) => Primitive, priority?: string): Transition<Datum>; (line 833)

Note that the tween is said to return a Primitive. This seems incorrect, both in terms of D3 intent and implementation.

The *correct* version appears to be:

styleTween(name: string, tween: (datum: Datum, index: number, attr: string) => (t: number) => Primitive, priority?: string): Transition<Datum>;

(This is similar to  similar to Transition.attrTween.)

First, the documentation states:

>>> The return value of tween must be an interpolator: a function that maps a parametric value t in the domain [0,1] 
>>>  to a color, number or arbitrary value.

Second, the source code of d3 3.5.5 has:

d3_transitionPrototype.styleTween = function(name, tween, priority) {
    if (arguments.length < 3) priority = "";
    function styleTween(d, i) {
      var f = tween.call(this, d, i, d3_window(this).getComputedStyle(this, null).getPropertyValue(name));
      return f && function(t) {
        this.style.setProperty(name, f(t), priority);
      };
    }
    return this.tween("style." + name, styleTween);
  };

Note the line "this.style.setProperty(name, f(t), priority);" where the result f of applying the tween is passed a parameter t. 

The only point of discussion might be the type of the return value of the tween's interpolator output. Is it Primitive or any? The documentation quoted above (incidentally the same for attrTween and styleTween) explicitly allows for an arbitrary value. I don't have enough D3 experience to know if this is a practically relevant possibility.

Many thanks for your great work on d3.d.ts!!! Especially the use of tweens and interpolators perfectly illustrates the benefits of Typescript.

Best wishes,

Matthias
2015-08-06 19:02:28 -04:00
Daniel Rosenwasser 9916c6f043 Fix overload order for 'jquery-sortable'. 2015-08-06 16:00:11 -07:00
Daniel Rosenwasser fc0f0afd0a Added missing properties for 'jquery.timepicker'. 2015-08-06 15:57:06 -07:00
Daniel Rosenwasser 23d1273719 Use JSDoc comments. 2015-08-06 15:28:38 -07:00
Daniel Rosenwasser 71738c9b95 Fix overload order for 'jquery.timepicker'. 2015-08-06 15:18:52 -07:00
Daniel Rosenwasser 55ebb8625a Fix overload order for 'jquery.colorpicker'. 2015-08-06 15:17:55 -07:00
Michael Nahkies c642fb841b Added definitions for amqplib (https://github.com/squaremo/amqp.node) 2015-08-07 09:51:39 +12:00
Dan Quirk b45569f35d Merge pull request #5233 from DanielRosenwasser/handleExtraObjectLiteralProperties
Handle extra object literal properties (Part II)
2015-08-06 13:37:36 -07:00
Michael Randolph b05ea8139c KaTeX definitions 2015-08-06 15:14:39 -04:00
Ivan Drinchev e33745b6ad Fixed tests for sequelize 2015-08-06 20:28:53 +02:00
Ivan Drinchev da093877f4 Added definitions for Sequelize 3.4.1 2015-08-06 20:06:25 +02:00
Roman Quiring ab17e16853 fixed definition of Vex.Flow.Formatter
- fixed arguments of FormatAndDraw()
- fixed arguments of FormatAndDrawTab()
2015-08-06 19:04:38 +02:00
Roman Quiring b4b5855f86 added vexflow-tests.ts 2015-08-06 18:55:31 +02:00
Roman Quiring fea6bb785a fixed definition of Vex.Flow.TabNote 2015-08-06 18:49:37 +02:00
Roman Quiring b330fede59 fixed definition of Vex.Flow.TextBracket
- fixed argument of setFont()
2015-08-06 18:47:42 +02:00
Roman Quiring 77445160ad changed CATEGORY property of several classes from static to const 2015-08-06 18:19:54 +02:00
Roman Quiring f8fb63d8cc changed definition of Vex.Flow.Modifier
- changed Position enum to const
2015-08-06 18:15:50 +02:00
Roman Quiring af4b4626fa changed definition of Vex.Flow.Curve
- changed Position enum to const
2015-08-06 18:15:08 +02:00
Roman Quiring 73c7432489 changed Vex.Flow.Barline
- changed type enum to const
2015-08-06 18:14:24 +02:00
Roman Quiring f5ec5ac8f0 changed Vex.Flow.Annotation
- changed enums to const
2015-08-06 18:13:33 +02:00
Roman Quiring 727502c429 fixed definition of Vex.Flow.StaveNote
- changed STEM_UP and STEM_DOWN from static to const
- fixed constructor arguments
2015-08-06 18:10:46 +02:00
Roman Quiring 15ccac22d6 changed Vex.Flow.Tickable from class to interface
- added respective methods to Vex.Flow.Note
2015-08-06 18:07:13 +02:00
Roman Quiring 59dd256bf2 fixed definition of Vex.Flow.Formatter
- fixed arguments of FormatAndDraw
- fixed arguments of FormatAndDrawTab
2015-08-06 18:02:33 +02:00
Roman Quiring 66440e6fb3 fixed definition of Vex.Flow.TabStave 2015-08-06 18:00:10 +02:00
Roman Quiring bc8e29fcd0 fixed definition of Vex.Flow.Glyph
- fixed argument of setOptions()
2015-08-06 17:57:07 +02:00
Roman Quiring f6c8562355 changed definition of Vex.Flow.Volta
- changed type enum to const
2015-08-06 17:53:41 +02:00
Roman Quiring 25f06dbb00 fixed definition of Vex.Flow.Voice
- changed enum Mode to const
- fixed constructor arguments
2015-08-06 17:50:22 +02:00
Roman Quiring dcef9183ea changed definition of Vex.Flow.Tuplet
- changed LOCATION_TOP and LOCATION_BOTTOM from static to const
2015-08-06 17:47:30 +02:00
Roman Quiring 6970bb6f78 changed definition of Vex.Flow.Tuning
- added names constant
2015-08-06 17:44:46 +02:00
Roman Quiring 1365098304 changed definition of Vex.Flow.TimeSignature
- added constant glyphs
2015-08-06 17:40:50 +02:00
Roman Quiring b3f154c5c3 fixed definition of Vex.Flow.TextNote
- changed Justification enum to const
- added GLYPHS const
- fixed constructor arguments
2015-08-06 17:37:05 +02:00
Roman Quiring c377f8452f fixed definition of Vex.Flow.TextBracket
- changed Positions enum to const
- fixed setFont()
- fixed constructor argument
2015-08-06 17:27:50 +02:00
Roman Quiring 0cf5c33231 fixed definition of Vex.Flow.TabTie 2015-08-06 17:23:04 +02:00
Roman Quiring 8eb312c09a fixed definition of Vex.Flow.TabSlide
- changed constants SLIDE_UP and SLIDE_DOWN from static to const
- fixed constructor arguments
2015-08-06 17:20:53 +02:00
Roman Quiring 45599bb3cf fixed definition of Vex.Flow.TabNote 2015-08-06 17:18:08 +02:00
Roman Quiring 41f25f3c76 changed definition of Vex.Flow.Stroke
- changed Type enum to const
2015-08-06 17:12:31 +02:00
Roman Quiring 57bd0ee3d5 fixed definition of Vex.Flow.StringNumber
- fixed arguments of setNote() and setLastNote()
2015-08-06 17:10:00 +02:00
Roman Quiring 8c097669b0 changed definition of Vex.Flow.Stem
- changed constants UP and DOWN from static to const
- removed constants WIDTH and HEIGHT as they are set by
Vex.Flow.STEM_WIDTH and Vex.Flow.STEM_HEIGHT
- added hide property
2015-08-06 17:03:31 +02:00
Roman Quiring 41a8267383 fixed definition of Vex.Flow.StaveTie 2015-08-06 16:57:21 +02:00
Roman Quiring 6add88934f fixed definition of Vex.Flow.StaveTempo
- fixed arguments of setTempo()
2015-08-06 16:51:39 +02:00
Roman Quiring 0936292468 changed definition of Vex.Flow.StaveLine
- changed enums to const
2015-08-06 16:45:22 +02:00
Roman Quiring b067174872 fixed definition of Vex.Flow.StaveHairpin
- changed type enum to const
- fixed arguments of FormatByTicksAndDraw()
- added missing declaration of renderHairpin()
2015-08-06 16:39:50 +02:00
Roman Quiring dbb9d1cbde fixed definition of Vex.Flow.StaveConnector
- changed type enum to const
- fixed type of setFont()
2015-08-06 16:32:38 +02:00
Roman Quiring 531a057c38 changed definition of Vex.Flow.Stave
- removed static THICKNESS as it is set by Vex.Flow.STAVE_LINE_THICKNESS
2015-08-06 16:28:44 +02:00
Roman Quiring b37a49c004 changed definition of Vex.Flow.Repetition
- changed type enum to const
2015-08-06 16:20:20 +02:00
Roman Quiring a4a2aaf62a changed definition of Vex.Flow.Renderer
- changed type of enums to const
2015-08-06 16:18:30 +02:00
Piraveen Kamalathas 7e1f79faa2 Add jquery.fullscreen typings 2015-08-06 16:10:55 +02:00
Osman Nuri Okumuş 4e59a0f2b5 update metismenu/metismenu.d.ts file 2015-08-06 13:36:04 +03:00
Osman Nuri Okumuş 2a878aca46 Create metismenu.d.ts
On branch master
 Your branch is up-to-date with 'origin/master'.

 Changes to be committed:
	new file:   metismenu/metismenu-tests.ts
	new file:   metismenu/metismenu.d.ts
2015-08-06 12:28:42 +03:00
Musa Karakaş f8e3b34ad9 lodash #5244 join/pop/shift do not return wrappers
_([1, 2]).join()    // "1,2"
_([1, 2]).pop()     // 2
_([1, 2]).shift()   // 1
2015-08-06 11:30:43 +03:00