angular-split
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -26,3 +26,3 @@ "use strict"; | ||
get: function () { | ||
return this.direction === 'vertical' ? 'row' : 'column'; | ||
return this.direction === 'horizontal' ? 'row' : 'column'; | ||
}, | ||
@@ -125,3 +125,3 @@ enumerable: true, | ||
} | ||
var prop = (this.direction === 'vertical') ? 'offsetWidth' : 'offsetHeight'; | ||
var prop = (this.direction === 'horizontal') ? 'offsetWidth' : 'offsetHeight'; | ||
this.sizes.container = this.elementRef.nativeElement[prop]; | ||
@@ -155,3 +155,3 @@ this.sizes.areaPixelA = this.sizes.container * areaA.size / 100; | ||
SplitComponent.prototype.drag = function (start, end, areaA, areaB) { | ||
var offsetPixel = (this.direction === 'vertical') ? (start.x - end.x) : (start.y - end.y); | ||
var offsetPixel = (this.direction === 'horizontal') ? (start.x - end.x) : (start.y - end.y); | ||
var newSizePixelA = this.sizes.areaPixelA - offsetPixel; | ||
@@ -158,0 +158,0 @@ var newSizePixelB = this.sizes.areaPixelB + offsetPixel; |
@@ -51,5 +51,5 @@ "use strict"; | ||
return 'default'; | ||
case 'vertical': | ||
return 'row-resize'; | ||
case 'horizontal': | ||
return 'row-resize'; | ||
case 'vertical': | ||
return 'col-resize'; | ||
@@ -62,5 +62,5 @@ } | ||
return ''; | ||
case 'vertical': | ||
return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFCAMAAABl/6zIAAAABlBMVEUAAADMzMzIT8AyAAAAAXRSTlMAQObYZgAAABRJREFUeAFjYGRkwIMJSeMHlBkOABP7AEGzSuPKAAAAAElFTkSuQmCC'; | ||
case 'horizontal': | ||
return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFCAMAAABl/6zIAAAABlBMVEUAAADMzMzIT8AyAAAAAXRSTlMAQObYZgAAABRJREFUeAFjYGRkwIMJSeMHlBkOABP7AEGzSuPKAAAAAElFTkSuQmCC'; | ||
case 'vertical': | ||
return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg=='; | ||
@@ -67,0 +67,0 @@ } |
{ | ||
"name": "angular-split", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Angular (2+) UI library to split views.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -66,3 +66,3 @@ import { Component, ChangeDetectorRef, Input, Output, HostBinding, ElementRef, SimpleChanges, | ||
@HostBinding('style.flex-direction') get styleFlexDirection() { | ||
return this.direction === 'vertical' ? 'row' : 'column'; | ||
return this.direction === 'horizontal' ? 'row' : 'column'; | ||
} | ||
@@ -184,3 +184,3 @@ | ||
const prop = (this.direction === 'vertical') ? 'offsetWidth' : 'offsetHeight'; | ||
const prop = (this.direction === 'horizontal') ? 'offsetWidth' : 'offsetHeight'; | ||
this.sizes.container = this.elementRef.nativeElement[prop]; | ||
@@ -222,3 +222,3 @@ this.sizes.areaPixelA = this.sizes.container * areaA.size / 100; | ||
private drag(start: Point, end: Point, areaA: IAreaData, areaB: IAreaData) { | ||
const offsetPixel = (this.direction === 'vertical') ? (start.x - end.x) : (start.y - end.y); | ||
const offsetPixel = (this.direction === 'horizontal') ? (start.x - end.x) : (start.y - end.y); | ||
@@ -225,0 +225,0 @@ const newSizePixelA = this.sizes.areaPixelA - offsetPixel; |
@@ -47,6 +47,6 @@ import { Directive, Input, ElementRef, Renderer } from '@angular/core'; | ||
case 'horizontal': | ||
case 'vertical': | ||
return 'row-resize'; | ||
case 'vertical': | ||
case 'horizontal': | ||
return 'col-resize'; | ||
@@ -61,6 +61,6 @@ } | ||
case 'horizontal': | ||
case 'vertical': | ||
return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFCAMAAABl/6zIAAAABlBMVEUAAADMzMzIT8AyAAAAAXRSTlMAQObYZgAAABRJREFUeAFjYGRkwIMJSeMHlBkOABP7AEGzSuPKAAAAAElFTkSuQmCC'; | ||
case 'vertical': | ||
case 'horizontal': | ||
return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg=='; | ||
@@ -67,0 +67,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
54659