New answers tagged

1

This is perfect example for inheritance. You should separate code into multiple files and get rid of if(type === '...') { // ... } conditions. Shape class should contain only common functions like public get isSelected(): boolean {} public set isSelected(value: boolean) {} public get isMoving(): boolean {} public set isMoving(value: boolean) {} // ... ...


2

In accordance with the D.R.Y. principle: the markup can be simplified by registering a component - and a template can be used with an X-Template. For example - add a <script> tag like this: <script type="text/x-template" id="text-container-template"> <div class="container"> <div class="text-area&...


Top 50 recent answers are included