Sean Condon | f4f54a1 | 2018-10-10 23:25:46 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018-present Open Networking Foundation |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | import { Component, OnInit } from '@angular/core'; |
| 17 | import { |
| 18 | LogService, |
| 19 | LoadingService, |
| 20 | FnService, |
| 21 | PanelBaseImpl |
| 22 | } from 'gui2-fw-lib'; |
Sean Condon | 50855cf | 2018-12-23 15:37:42 +0000 | [diff] [blame] | 23 | import {animate, state, style, transition, trigger} from '@angular/animations'; |
Sean Condon | f4f54a1 | 2018-10-10 23:25:46 +0100 | [diff] [blame] | 24 | |
| 25 | /* |
| 26 | ONOS GUI -- Topology Toolbar Module. |
| 27 | Defines modeling of ONOS toolbar. |
| 28 | */ |
| 29 | @Component({ |
| 30 | selector: 'onos-toolbar', |
| 31 | templateUrl: './toolbar.component.html', |
| 32 | styleUrls: [ |
| 33 | './toolbar.component.css', './toolbar.theme.css', |
| 34 | '../../topology.common.css', |
| 35 | '../../../../fw/widget/panel.css', '../../../../fw/widget/panel-theme.css' |
Sean Condon | 50855cf | 2018-12-23 15:37:42 +0000 | [diff] [blame] | 36 | ], |
| 37 | animations: [ |
| 38 | trigger('toolbarState', [ |
| 39 | state('true', style({ |
| 40 | transform: 'translateX(0%)', |
| 41 | opacity: '1.0' |
| 42 | })), |
| 43 | state('false', style({ |
| 44 | transform: 'translateX(-100%)', |
| 45 | opacity: '0.0' |
| 46 | })), |
| 47 | transition('0 => 1', animate('100ms ease-in')), |
| 48 | transition('1 => 0', animate('100ms ease-out')) |
| 49 | ]) |
Sean Condon | f4f54a1 | 2018-10-10 23:25:46 +0100 | [diff] [blame] | 50 | ] |
| 51 | }) |
| 52 | export class ToolbarComponent extends PanelBaseImpl implements OnInit { |
| 53 | |
| 54 | constructor( |
| 55 | protected fs: FnService, |
| 56 | protected log: LogService, |
| 57 | protected ls: LoadingService, |
| 58 | ) { |
| 59 | super(fs, ls, log); |
Sean Condon | 50855cf | 2018-12-23 15:37:42 +0000 | [diff] [blame] | 60 | this.on = false; |
Sean Condon | f4f54a1 | 2018-10-10 23:25:46 +0100 | [diff] [blame] | 61 | this.log.debug('ToolbarComponent constructed'); |
| 62 | } |
| 63 | |
| 64 | ngOnInit() { |
| 65 | } |
| 66 | |
| 67 | } |