bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20896: 25.0.50; [js-mode][FR] support chain syntax indentation


From: Rasmus
Subject: bug#20896: 25.0.50; [js-mode][FR] support chain syntax indentation
Date: Fri, 26 Jun 2015 02:14:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Hi,

Rasmus <rasmus@gmx.us> writes:

> var an_axis = axes.append("g")
>                   .call(d3.svg.axis()
>                           .scale(Scale)
>                           .orient("bottom"));


Actually, this case is not as crazy as first assumed and should ideally be
supported.  Here's a pretty reasonable example (except for names being too
long):

      plot.axes.yScale = d3.scale.ordinal()
                           .domain(d3.range(bar.ybins).map(function(d){return 
d*10;}))
                           .range(d3.range(bar.ybins)
                                    .map(function(d,i) {
                                        return 
plot.height-plot.height/bar.ybins * i;}));


Also, notice there's another, potential, indentation typo in this code.
The last "return" should be one character to the right IMO, i.e.

    .map(function(d,i) {
         return plot.height-plot.height/bar.ybins * i;}));

Thanks,
Rasmus

-- 
Dung makes an excellent fertilizer






reply via email to

[Prev in Thread] Current Thread [Next in Thread]