File tree Expand file tree Collapse file tree 1 file changed +30
-30
lines changed Expand file tree Collapse file tree 1 file changed +30
-30
lines changed Original file line number Diff line number Diff line change 732732
733733 ` ` `
734734
735- ** [[⬆]](#TOC )**
736-
737735 - Use indentation when making long method chains.
738736
739- ` ` ` javascript
740- // bad
741- $('#items').find('.selected').highlight().end().find('.open').updateCount();
742-
743- // good
744- $('#items')
745- .find('.selected')
746- .highlight()
747- .end()
748- .find('.open')
749- .updateCount();
750-
751- // bad
752- var leds = stage.selectAll('.led').data(data).enter().append("svg:svg").class('led', true)
753- .attr('width', (radius + margin) * 2).append("svg:g")
754- .attr("transform", "translate(" + (radius + margin) + "," + (radius + margin) + ")")
755- .call(tron.led);
756-
757- // good
758- var leds = stage.selectAll('.led')
759- .data(data)
760- .enter().append("svg:svg")
761- .class('led', true)
762- .attr('width', (radius + margin) * 2)
763- .append("svg:g")
764- .attr("transform", "translate(" + (radius + margin) + "," + (radius + margin) + ")")
765- .call(tron.led);
766- ` ` `
737+ ` ` ` javascript
738+ // bad
739+ $('#items').find('.selected').highlight().end().find('.open').updateCount();
740+
741+ // good
742+ $('#items')
743+ .find('.selected')
744+ .highlight()
745+ .end()
746+ .find('.open')
747+ .updateCount();
748+
749+ // bad
750+ var leds = stage.selectAll('.led').data(data).enter().append("svg:svg").class('led', true)
751+ .attr('width', (radius + margin) * 2).append("svg:g")
752+ .attr("transform", "translate(" + (radius + margin) + "," + (radius + margin) + ")")
753+ .call(tron.led);
754+
755+ // good
756+ var leds = stage.selectAll('.led')
757+ .data(data)
758+ .enter().append("svg:svg")
759+ .class('led', true)
760+ .attr('width', (radius + margin) * 2)
761+ .append("svg:g")
762+ .attr("transform", "translate(" + (radius + margin) + "," + (radius + margin) + ")")
763+ .call(tron.led);
764+ ` ` `
765+
766+ ** [[⬆]](#TOC )**
767767
768768## < a name= ' leading-commas' > Leading Commas< / a>
769769
You can’t perform that action at this time.
0 commit comments