From b6f8a62a3523149bca3feda2ec8546297114ebf1 Mon Sep 17 00:00:00 2001 From: Rainer Simon Date: Sun, 12 Apr 2020 10:30:15 +0200 Subject: [PATCH] Added isEqual method for consistency with WebAnnotation --- src/selection/Selection.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/selection/Selection.js b/src/selection/Selection.js index c8e5416..ec88f8f 100644 --- a/src/selection/Selection.js +++ b/src/selection/Selection.js @@ -47,6 +47,14 @@ export default class Selection { } /** For consistency with WebAnnotation **/ + isEqual(other) { + if (!other) { + return false; + } else { + return this._stub === other._stub; + } + } + get bodies() { return this._stub.body; }