react-pdf-annotator
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -27,2 +27,5 @@ "use strict"; | ||
// $FlowFixMe | ||
var AreaHighlight = function (_Component) { | ||
@@ -45,16 +48,21 @@ _inherits(AreaHighlight, _Component); | ||
className: "AreaHighlight", | ||
onDragStop: function onDragStop(_, ui) { | ||
var boundingRect = _extends({}, highlight.position.boundingRect, ui.position); | ||
onDragStop: function onDragStop(_, data) { | ||
var boundingRect = _extends({}, highlight.position.boundingRect, { | ||
top: data.y, | ||
left: data.x | ||
}); | ||
onChange(boundingRect); | ||
}, | ||
onResizeStop: function onResizeStop(direction, styleSize, clientSize, delta, position) { | ||
var boundingRect = _extends({}, styleSize, { | ||
onResizeStop: function onResizeStop(_, direction, ref, delta, position) { | ||
var boundingRect = { | ||
top: position.y, | ||
left: position.x | ||
}); | ||
left: position.x, | ||
width: ref.offsetWidth, | ||
height: ref.offsetHeight | ||
}; | ||
onChange(boundingRect); | ||
}, | ||
initial: { | ||
"default": { | ||
x: highlight.position.boundingRect.left, | ||
@@ -61,0 +69,0 @@ y: highlight.position.boundingRect.top, |
{ | ||
"name": "react-pdf-annotator", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Set of React components for PDF annotation", | ||
@@ -17,3 +17,3 @@ "main": "lib/index.js", | ||
"deploy": "npm run build && gh-pages --dist ./demo/dist --branch gh-pages", | ||
"publish": "npm run build && npm run copy-files && npm publish", | ||
"prepublish": "npm run build && npm run copy-files", | ||
"prettier": "prettier --write 'src/**/*.js' 'demo/src/**/*.js'" | ||
@@ -23,3 +23,3 @@ }, | ||
"pdfjs-dist": "^2.0.159", | ||
"react-rnd": "4.2.0" | ||
"react-rnd": "^7.1.5" | ||
}, | ||
@@ -26,0 +26,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
104780
1433
+ Addedobject-assign@4.1.1(transitive)
+ Addedprop-types@15.8.1(transitive)
+ Addedre-resizable@4.5.1(transitive)
+ Addedreact-draggable@3.3.2(transitive)
+ Addedreact-is@16.13.1(transitive)
+ Addedreact-rnd@7.4.3(transitive)
- Removed@bokuweb/react-draggable-custom@1.4.2(transitive)
- Removedlodash.isequal@4.5.0(transitive)
- Removedreact-resizable-box@1.8.4(transitive)
- Removedreact-rnd@4.2.0(transitive)
Updatedreact-rnd@^7.1.5