Skip to content

v2.0.2

Compare
Choose a tag to compare
@MasterOdin MasterOdin released this 18 Apr 13:22
435284f

Large refactor of the code to better enable it to be used both within Submitty and other projects. Fixes and enables linting and testing of the code for better CI.

This package is now published to the NPM registry: https://www.npmjs.com/package/@submitty/pdf-annotate.js

Note: Support for very old browsers is deprecated as of this release, which we define as having <1% of users or are considered dead. In a future release, we will use babel to transform the code to only support browsers that have >1% user usage and are not considered dead.

Breaking Changes:

  • Remove usage of a user_id throughout the core of pdf-annotate.js. This fixes a lot of problems involved with creating/saving annotations where the user_id information was not being passed correctly.
  • Create new LocalUserStoreAdapter.js as example of how one could do annotations from multiple users on same document. This store shows also how to make it so that one user cannot override another user's annotations unless they're marked a super user within the store.
  • Unify support for MouseEvents and TouchEvents into PointerEvents
  • Remove the dist/ folder. Built files should be gotten from the Releases page.
  • Upgrade core dependency:
    • pdfjs: 1.4.162 -> 2.0.943

Fixes

  • Improve eraser deleting annotations within its path when moving it quickly
  • Fix the color picker in web demo not showing color on hover
  • Don't trim the whitespace in the front of the text annotation

Testing

  • Fix the broken tests within the test suite
  • Test library under both Chrome and Firefox
  • Use eslint to enforce code style
  • Use coveralls to measure code coverage
  • Remove testing on Node 9
  • Add testing on Node 11
  • Remove usage of simulant as it does not support PointerEvents and we are not supporting really old browsers

Misc

  • Remove the checked-in PDF.js source code under shared/. This should be copied into place from the pdfjs-dist library automatically when running npm start.
  • Upgrade a lot of the out-of-date dev dependencies (core ones listed below):
    • babel: 6.26 -> 7.3
    • chai: 3.5 -> 4.2
    • karma: 2.0 -> 4.0
    • sinon: 1.17.3 -> 7.2.6
    • webpack: 1.12.14 -> 4.29