client/src/api/WebAnnotationSerializer.js
changeset 102 b0e36664f1f2
parent 100 6fd752d98933
child 129 d48946d164c6
equal deleted inserted replaced
101:e165aa89ac82 102:b0e36664f1f2
    25         };
    25         };
    26 
    26 
    27         annotation = Object.assign({}, annotation, { body })
    27         annotation = Object.assign({}, annotation, { body })
    28       }
    28       }
    29 
    29 
       
    30       const selectors = [
       
    31         {
       
    32           "type": "TextQuoteSelector",
       
    33           "exact": category.text,
       
    34         }, {
       
    35           "type": "TextPositionSelector",
       
    36           "start": category.selection.start,
       
    37           "end": category.selection.end,
       
    38         }
       
    39       ]
       
    40 
    30       return Object.assign({}, annotation, {
    41       return Object.assign({}, annotation, {
    31         "target": {
    42         "target": {
    32           "source": source,
    43           "source": source,
    33           "selector": {
    44           "selector": selectors
    34             "type": "TextQuoteSelector",
       
    35             "exact": category.text,
       
    36           }
       
    37         }
    45         }
    38       })
    46       })
    39     });
    47     });
    40 
    48 
    41   }
    49   }