-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathauto-grow.directives.js
48 lines (48 loc) · 2.25 KB
/
auto-grow.directives.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
System.register(['angular2/core'], function(exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1;
var AutoGrowDirective;
return {
setters:[
function (core_1_1) {
core_1 = core_1_1;
}],
execute: function() {
AutoGrowDirective = (function () {
function AutoGrowDirective(el, renderer) {
this.el = el;
this.renderer = renderer;
}
AutoGrowDirective.prototype.onFocus = function () {
this.renderer.setElementStyle(this.el.nativeElement, 'width', '200');
};
AutoGrowDirective.prototype.onBlur = function () {
this.renderer.setElementStyle(this.el.nativeElement, 'width', '100');
};
AutoGrowDirective = __decorate([
core_1.Directive({
selector: '[autoGrow]',
host: {
'(focus)': 'onFocus()',
'(blur)': 'onBlur()'
}
}),
__metadata('design:paramtypes', [core_1.ElementRef, core_1.Renderer])
], AutoGrowDirective);
return AutoGrowDirective;
}());
exports_1("AutoGrowDirective", AutoGrowDirective);
}
}
});
//# sourceMappingURL=auto-grow.directives.js.map