Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

Commit

Permalink
fix weird build error
Browse files Browse the repository at this point in the history
  • Loading branch information
scttcper committed Dec 1, 2017
1 parent fdc0498 commit 6a5ec29
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 52 deletions.
51 changes: 8 additions & 43 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-trend",
"version": "3.0.0",
"version": "3.0.1",
"license": "MIT",
"scripts": {
"ng": "ng",
Expand Down Expand Up @@ -33,7 +33,7 @@
"zone.js": "^0.8.18"
},
"devDependencies": {
"@angular/cli": "^1.6.0-rc.1",
"@angular/cli": "1.5.5",
"@angular/compiler-cli": "^5.0.4",
"@angular/language-service": "^5.0.4",
"@types/jasmine": "^2.8.2",
Expand Down
9 changes: 7 additions & 2 deletions src/app/slider/slider.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';
import {
Component,
EventEmitter,
Input,
Output,
ViewEncapsulation,
} from '@angular/core';

@Component({
selector: 'slider',
Expand Down Expand Up @@ -26,5 +32,4 @@ export class SliderComponent {
onChange(value) {
this.valueChange.emit(value);
}

}
5 changes: 2 additions & 3 deletions src/lib/helpers/math.helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ export interface Point {
* @returns an object holding the x/y coordinates of the midpoint.
*/
export function moveTo(to: Point, from: Point, radius: number): Point {
const vector = { x: to.x - from.x, y: to.y - from.y };
const length = Math.sqrt(vector.x * vector.x + vector.y * vector.y);
const unitVector = { x: vector.x / length, y: vector.y / length };
const length = Math.sqrt((to.x - from.x) * (to.x - from.x) + (to.y - from.y) * (to.y - from.y));
const unitVector = { x: (to.x - from.x) / length, y: (to.y - from.y) / length };

return {
x: from.x + unitVector.x * radius,
Expand Down
5 changes: 3 additions & 2 deletions src/lib/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "ngx-trend",
"version": "3.0.0",
"version": "3.0.1",
"description": "ngx-trend Angular component",
"main": "./bundles/trend.umd.js",
"module": "./trend.es5.js",
"es2015": "./trend.es2015.js",
"typings": "./index.d.ts",
"peerDependencies": {
"@angular/core": ">=5.0.0 <=6.0.0",
"@angular/common": ">=5.0.0 <=6.0.0"
"@angular/common": ">=5.0.0 <=6.0.0",
"@angular/animations": ">=5.0.0 <=6.0.0"
},
"repository": "https://github.com/scttcper/ngx-trend.git",
"homepage": "https://github.com/scttcper/ngx-trend",
Expand Down

0 comments on commit 6a5ec29

Please sign in to comment.