|
117 | 117 | case 'underline':
|
118 | 118 | var start = new ps.Point(event.point);
|
119 | 119 | $rootScope.startRow = getStartRow($rootScope.docInfo, start, attrs);
|
120 |
| - $rootScope.startText = $rootScope.startRow[0].characterCoordinates.filter(x = > Math.floor(x) > Math.floor(start.x) |
| 120 | + $rootScope.startText = $rootScope.startRow[0].characterCoordinates.filter(x => Math.floor(x) > Math.floor(start.x) |
121 | 121 | )
|
122 | 122 | ;
|
123 | 123 | if ($rootScope.startText.length > 1) {
|
|
134 | 134 | case 'strikeout':
|
135 | 135 | var start = new ps.Point(event.point);
|
136 | 136 | $rootScope.startRow = getStartRow($rootScope.docInfo, start, attrs);
|
137 |
| - $rootScope.startText = $rootScope.startRow[0].characterCoordinates.filter(x = > Math.floor(x) > Math.floor(start.x) |
| 137 | + $rootScope.startText = $rootScope.startRow[0].characterCoordinates.filter(x => Math.floor(x) > Math.floor(start.x) |
138 | 138 | )
|
139 | 139 | ;
|
140 | 140 | if ($rootScope.startText.length > 1) {
|
|
178 | 178 | case 'underline':
|
179 | 179 | if (currentObject) {
|
180 | 180 | var end = new ps.Point(event.point);
|
181 |
| - var endText = $rootScope.startRow[0].characterCoordinates.filter(x = > Math.floor(x) > Math.floor(end.x) |
| 181 | + var endText = $rootScope.startRow[0].characterCoordinates.filter(x => Math.floor(x) > Math.floor(end.x) |
182 | 182 | )
|
183 | 183 | ;
|
184 | 184 | if (endText.length > 1) {
|
|
192 | 192 | case 'strikeout':
|
193 | 193 | if (currentObject) {
|
194 | 194 | var end = new ps.Point(event.point);
|
195 |
| - var endText = $rootScope.startRow[0].characterCoordinates.filter(x = > Math.floor(x) > Math.floor(end.x) |
| 195 | + var endText = $rootScope.startRow[0].characterCoordinates.filter(x => Math.floor(x) > Math.floor(end.x) |
196 | 196 | )
|
197 | 197 | ;
|
198 | 198 | if (endText.length > 1) {
|
|
483 | 483 | function getStartRow(docInfo, start, attrs) {
|
484 | 484 | var startRow = [];
|
485 | 485 | for (var i = 0; i < 30; i++) {
|
486 |
| - startRow = docInfo.pages[attrs.number].rows.filter(x = > Math.floor(x.lineTop) == (Math.floor(start.y) - i ) |
| 486 | + startRow = docInfo.pages[attrs.number].rows.filter(x => Math.floor(x.lineTop) == (Math.floor(start.y) - i ) |
487 | 487 | )
|
488 | 488 | ;
|
489 | 489 | if (startRow.length > 0)
|
490 | 490 | return startRow;
|
491 | 491 | }
|
492 | 492 | if (startRow.length == 0)
|
493 | 493 | for (var i = 0; i < 30; i++) {
|
494 |
| - startRow = docInfo.pages[attrs.number].rows.filter(x = > Math.floor(x.lineTop) == (Math.floor(start.y) + i ) |
| 494 | + startRow = docInfo.pages[attrs.number].rows.filter(x => Math.floor(x.lineTop) == (Math.floor(start.y) + i ) |
495 | 495 | )
|
496 | 496 | ;
|
497 | 497 | if (startRow.length > 0)
|
|
0 commit comments