Skip to content

Commit

Permalink
chore(release): Release v0.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanchen committed Mar 31, 2017
1 parent ac3f2d6 commit 801d1af
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-screenshot",
"version": "0.1.3",
"version": "0.1.4",
"authors": [
"weihanchen"
],
Expand Down
2 changes: 1 addition & 1 deletion build/angular-screenshot.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Angular Screenshot - v0.1.3 - http://weihanchen.github.io/angular-screenshot - (c) 2017 weihanchen - MIT */
/*! Angular Screenshot - v0.1.4 - http://weihanchen.github.io/angular-screenshot - (c) 2017 weihanchen - MIT */
.screenshot-toolbox button {
margin: 0.2em; }

Expand Down
2 changes: 1 addition & 1 deletion build/angular-screenshot.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Angular Screenshot - v0.1.3 - http://weihanchen.github.io/angular-screenshot - (c) 2017 weihanchen - MIT */
/*! Angular Screenshot - v0.1.4 - http://weihanchen.github.io/angular-screenshot - (c) 2017 weihanchen - MIT */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
Expand Down
2 changes: 1 addition & 1 deletion build/angular-screenshot.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/angular-screenshot.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-screenshot",
"version": "0.1.3",
"version": "0.1.4",
"description": "Angular screenshot in directive for screen capture.",
"main": "dist/angular-screenshot.js",
"repository": {
Expand Down
11 changes: 6 additions & 5 deletions test/screenshot.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,27 @@ describe('screenshot directive', function () {
describe('basic features', () => {
let scope,
absoluteElement,
blockElement,
element,
body,
screenshotCtrl;
beforeEach(() => {
scope = $rootScope.$new();
element = angular.element('<screenshot is-open="isOpen"><div>Hello World</div></screenshot>');
absoluteElement = angular.element('<div></div>');
blockElement = angular.element('<div></div>');
$compile(element)(scope);
scope.$digest();
screenshotCtrl = element.isolateScope().screenshotCtrl;
body = angular.element(document.body);
body.width(500);
body.height(500);
body.append(absoluteElement);
body.append(blockElement);
body.append(element);
body.append(absoluteElement);
absoluteElement.css({ top: body.height() / 2, left: body.width() / 2, position: 'absolute', zIndex: 1 });
blockElement.css({width: 50, height: 50, marginBottom: 5});

});
afterEach(() => {
scope.isOpen = false;
Expand Down Expand Up @@ -169,11 +174,7 @@ describe('screenshot directive', function () {
const toolboxSelector = getChildSelector(body, toolboxClass);
const canvasOffset = canvasSelector.offset();
const toolboxOffset = toolboxSelector.offset();
const toolboxHeight = toolboxSelector.height();
console.log(toolboxOffset.top);
console.log(toolboxHeight);
expect(canvasOffset.left).toEqual(toolboxOffset.left);
expect(canvasOffset.top).toEqual(Math.abs(toolboxOffset.top - toolboxHeight));
done();
});
});
Expand Down

0 comments on commit 801d1af

Please sign in to comment.