-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide [rzContainment]
- Loading branch information
Xie, Ziyu
committed
Jul 2, 2018
1 parent
00474a9
commit 68138c9
Showing
10 changed files
with
201 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/app/views/resizable-demo/resize-containment-demo/resize-containment-demo.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<div class="row"> | ||
<div class="col" style="min-height: 300px;"> | ||
<div id="container" class="widget-container"> | ||
<h4 class="widget-header">Containment</h4> | ||
<!-- rzContainment could be a CSS selector string, 'parent' or an Element object --> | ||
<div ngResizable class="resizable-widget" rzContainment="#container" rzHandles="all"> | ||
<h4 class="widget-header">Resizable</h4> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<!-- Documents --> | ||
<div class="row mt-4"> | ||
<div class="col"> | ||
<tabset> | ||
<tab heading="html"> | ||
<markdown [data]="demo_html | language: 'html'"></markdown> | ||
</tab> | ||
<tab heading="component"> | ||
<markdown [data]="demo_ts | language: 'typescript'"></markdown> | ||
</tab> | ||
</tabset> | ||
</div> | ||
</div> |
Empty file.
19 changes: 19 additions & 0 deletions
19
src/app/views/resizable-demo/resize-containment-demo/resize-containment-demo.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
declare const require: any; | ||
|
||
@Component({ | ||
selector: 'app-resize-containment-demo', | ||
templateUrl: './resize-containment-demo.component.html', | ||
styleUrls: ['./resize-containment-demo.component.scss'] | ||
}) | ||
export class ResizeContainmentDemoComponent implements OnInit { | ||
demo_html = require('!!html-loader!./resize-containment-demo.component.html'); | ||
demo_ts = require('!!raw-loader!./resize-containment-demo.component.ts'); | ||
|
||
constructor() { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
.resizable-widget { | ||
width: 200px; | ||
height: 200px; | ||
background-color: #fff; | ||
border: solid 1px #869fac; | ||
background-color: $white; | ||
border: solid 1px $gray-400; | ||
padding: 0.5em; | ||
} | ||
|
||
.widget-header { | ||
text-align: center; | ||
border: 1px solid #869fac; | ||
border: 1px solid $gray-400; | ||
background: #e9e9e9; | ||
color: #333333; | ||
font-weight: bold; | ||
padding: 0.25em; | ||
} | ||
|
||
.widget-container { | ||
width: 300px; | ||
height: 300px; | ||
padding: 0.5em; | ||
background-color: $cyan; | ||
border: solid 1px $gray-400; | ||
} |