OLD | NEW |
1 import 'dart:html'; | 1 import 'dart:html'; |
2 | 2 |
3 import 'package:dart_style/dart_style.dart'; | 3 import 'package:dart_style/dart_style.dart'; |
4 | 4 |
5 TextAreaElement before; | 5 TextAreaElement before; |
6 TextAreaElement after; | 6 TextAreaElement after; |
7 | 7 |
8 int width = 80; | 8 int width = 80; |
9 | 9 |
10 PreElement columnMarker = querySelector(".column-marker"); | 10 PreElement columnMarker = querySelector(".column-marker"); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 void setWidth(String widthString) { | 57 void setWidth(String widthString) { |
58 width = int.parse(widthString); | 58 width = int.parse(widthString); |
59 | 59 |
60 widthInput.value = widthString; | 60 widthInput.value = widthString; |
61 widthOutput.value = widthString; | 61 widthOutput.value = widthString; |
62 | 62 |
63 var pad = " " * width + "|"; | 63 var pad = " " * width + "|"; |
64 columnMarker.innerHtml = "$pad $width columns" + "\n$pad" * 29; | 64 columnMarker.innerHtml = "$pad $width columns" + "\n$pad" * 29; |
65 reformat(); | 65 reformat(); |
66 } | 66 } |
OLD | NEW |