Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Commit

Permalink
feat(calibrator): move to gemini-core
Browse files Browse the repository at this point in the history
  • Loading branch information
DudaGod committed Jan 12, 2018
1 parent 5006927 commit cb25445
Show file tree
Hide file tree
Showing 12 changed files with 181 additions and 423 deletions.
3 changes: 1 addition & 2 deletions lib/browser-pool.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

const BrowserPool = require('gemini-core').BrowserPool;
const Calibrator = require('./calibrator');
const {BrowserPool, Calibrator} = require('gemini-core');
const Browser = require('./browser');
const Events = require('./constants/events');

Expand Down
10 changes: 4 additions & 6 deletions lib/browser/camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,10 @@ module.exports = class Camera {
return image;
}

return image.crop({
left: this._calibration.left,
top: this._calibration.top,
width: image.getSize().width - this._calibration.left,
height: image.getSize().height - this._calibration.top
});
const {left, top} = this._calibration;
const {width, height} = image.getSize();

return image.crop({left, top, width: width - left, height: height - top});
}

_cropToViewport(image, page) {
Expand Down
63 changes: 0 additions & 63 deletions lib/browser/client-scripts/gemini.calibrate.js

This file was deleted.

140 changes: 0 additions & 140 deletions lib/calibrator.js

This file was deleted.

Loading

0 comments on commit cb25445

Please sign in to comment.