Commit Graph

572 Commits

Author SHA1 Message Date
Andreas Hocevar 0cda18f58a Merge pull request #9008 from ahocevar/decouple-group-creation
Decouple render instruction creation from rendering
2018-12-07 14:33:54 +01:00
Frederic Junod b3520f8217 Remove CANVAS_LINE_DASH from ol/has
Test if `context.setLineDash` is defined instead.
2018-12-07 13:15:23 +01:00
Niklas Alt 4bc9216e41 Add ': void' to non returning functions (error TS7014) 2018-12-06 19:57:45 +01:00
Niklas Alt 3ef6e39c26 Use camel-cased inheritDoc for consistency 2018-12-03 20:42:03 +01:00
ahocevar fbf98a44ea Streamline tile preparation and remove unused code 2018-11-29 22:35:46 +01:00
ahocevar f4aec3fd01 Remove unused Builder/Executor functions and members 2018-11-25 20:06:37 +01:00
Tim Schaub 8b50c3c6cb Pass along the ability to measure and cache text width 2018-11-19 15:34:48 -07:00
ahocevar 8d51e0d487 Remove resolved FIXMEs 2018-11-16 13:50:42 +01:00
ahocevar 981b398042 Add a FIXME for the measure function to go away 2018-11-16 13:49:50 +01:00
ahocevar 6cbde797be Use NaN for unavailable values and handle text creation separately 2018-11-16 13:35:15 +01:00
ahocevar d3355f613c Combine if blocks 2018-11-16 13:04:03 +01:00
Guillaume Beraudo 81d0bc21d5 Pass instructions to executor constructor 2018-11-16 12:36:50 +01:00
Guillaume Beraudo ce44a9a3e4 Final renamings 2018-11-15 23:46:20 +01:00
Guillaume Beraudo 89fed65f07 Fix incorrect Executor/Builder types 2018-11-15 23:27:43 +01:00
Guillaume Beraudo eaed37da96 Fix width comparison 2018-11-15 20:03:35 +01:00
Guillaume Beraudo b1a5f4855f Create geometryWidths array only when needed 2018-11-15 20:03:34 +01:00
ahocevar 94bf02176e Rename ExecutorGroup and move getMaxExtent to Executor 2018-11-15 20:03:34 +01:00
Guillaume Beraudo f9dcadb982 Remove unused methods 2018-11-15 15:20:41 +01:00
Guillaume Beraudo 0f5ced8483 Reduce usage of "replay" term 2018-11-15 15:20:41 +01:00
Guillaume Beraudo 87a1b926c9 Cleanup executor of unused properties 2018-11-15 15:20:41 +01:00
Guillaume Beraudo 4ba84d7926 Cleanly separate text building and execution 2018-11-15 15:20:41 +01:00
Guillaume Beraudo afc946b215 Cleanup duplicated and unused code 2018-11-15 15:20:41 +01:00
Guillaume Beraudo c0df61468f Move drawText along line to executor 2018-11-15 15:20:41 +01:00
Guillaume Beraudo 0ece0fb002 Cleanup unused text replay code 2018-11-15 15:20:41 +01:00
ahocevar 4ce19530ce Remove unused methods 2018-11-15 15:20:41 +01:00
ahocevar 3d203f990e Move measureTextWidths to render/canvas 2018-11-15 15:20:41 +01:00
Guillaume Beraudo 3170355b07 Remove unused function from executor 2018-11-15 15:20:41 +01:00
Guillaume Beraudo f5a8ad63f9 Improve typing 2018-11-15 15:20:41 +01:00
Guillaume Beraudo ba6a6fff7d Module renaming 2018-11-15 15:20:41 +01:00
Guillaume Beraudo e299863117 More renaming 2018-11-15 15:20:41 +01:00
Guillaume Beraudo f3bd08321a Rename Replay to InstructionsBuilder 2018-11-15 15:20:41 +01:00
Guillaume Beraudo 8097be8419 Remove replay code from Instruction Builder class 2018-11-15 15:20:41 +01:00
Guillaume Beraudo fcf470fc8d Introduce Instruction executors
Executors are use to render instructions.
They do not contain cod for building instructions.

Signed-off-by: Guillaume Beraudo <guillaume.beraudo@camptocamp.com>
2018-11-15 15:20:41 +01:00
Guillaume Beraudo ecf79a9ec2 First step in uncoupling replay creation and rendering
Signed-off-by: Guillaume Beraudo <guillaume.beraudo@camptocamp.com>
2018-11-15 15:20:41 +01:00
ahocevar 30909ddbcd When rendering interim tiles, reuse existing replay groups 2018-11-13 16:08:49 +01:00
Frederic Junod 1732ed5a04 Simplify import path in ol/render/ 2018-11-05 16:26:45 +01:00
ahocevar 1df9189d7f Fix more types for TypeScript 2018-10-30 18:55:03 +01:00
Frederic Junod 041836c645 Change getUid return type from number to string 2018-10-17 10:22:53 +02:00
William Wall b8addb4c24 Fix missing method declaration
ol/renderer/vector was using the abstract ReplayGroup type while
referencing replayGroup.addDeclutter(), which was only defined
on the canvas and webgl implementations and was also defined
differently.
2018-10-03 16:08:26 -06:00
Kevin Schmidt 9b12b30100 Fix type check errors in ol/render/canvas/TextReplay 2018-10-02 12:39:45 -06:00
Kevin Schmidt 9ac00667b4 Fix type check errors in ol/render/canvas/Replay 2018-10-02 12:38:31 -06:00
Kevin Schmidt 452d5454cb Fix type check errors in ol/render/canvas/Immediate 2018-10-02 12:32:37 -06:00
Kevin Schmidt accdc79c05 Use typeof to simplify JSDoc class types 2018-10-01 08:30:06 -06:00
Frédéric Junod 978b039ddc Merge pull request #8654 from fredj/import
Remove extra imports in jsdoc
2018-09-19 15:12:10 +02:00
Frederic Junod 9c52e0d6d9 Remove extra imports in jsdoc
The symbols are already imported (es6 import)
2018-09-19 14:52:58 +02:00
Frederic Junod 7cb85fa975 Don't define functions in the prototype
If `VOID` is used, TypeScript is not able to figure out what the function parameters are.

Before:
```
$ npx tsc | wc -l
    1188
```

After:
```
$ npx tsc | wc -l
    1169
```
2018-09-19 08:40:14 +02:00
Frederic Junod ea616e7751 Don't import ourselves 2018-09-06 09:05:32 +02:00
Tim Schaub ccfacc5ee6 Transformed types
Using the [ts.js codemod](https://gist.github.com/tschaub/1ea498c9d1e5268cf36d212b3949be4e):

    jscodeshift --transform ts.js src
2018-09-05 08:05:29 -06:00
ahocevar b9aceb23ac Let renderer decide whether to snapToPixel or not, also for text 2018-08-09 18:16:58 +02:00
ahocevar 2f92e48e93 Use super.method instead of prototype.method.call 2018-08-06 15:30:17 +02:00