Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
siibra-explorer
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiao Gui
siibra-explorer
Commits
9cf9dddb
Commit
9cf9dddb
authored
6 years ago
by
Xiao Gui
Browse files
Options
Downloads
Patches
Plain Diff
bugfix: no dockedContainer === no minimise icon
parent
713dc886
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/atlasViewer/widgetUnit/widgetUnit.component.ts
+13
-8
13 additions, 8 deletions
src/atlasViewer/widgetUnit/widgetUnit.component.ts
src/atlasViewer/widgetUnit/widgetUnit.template.html
+1
-1
1 addition, 1 deletion
src/atlasViewer/widgetUnit/widgetUnit.template.html
with
14 additions
and
9 deletions
src/atlasViewer/widgetUnit/widgetUnit.component.ts
+
13
−
8
View file @
9cf9dddb
import
{
Component
,
ViewChild
,
ViewContainerRef
,
ComponentRef
,
HostBinding
,
HostListener
,
Output
,
EventEmitter
,
Input
,
ElementRef
}
from
"
@angular/core
"
;
import
{
Component
,
ViewChild
,
ViewContainerRef
,
ComponentRef
,
HostBinding
,
HostListener
,
Output
,
EventEmitter
,
Input
,
ElementRef
,
OnInit
}
from
"
@angular/core
"
;
import
{
WidgetServices
}
from
"
./widgetService.service
"
;
...
...
@@ -9,7 +9,7 @@ import { WidgetServices } from "./widgetService.service";
]
})
export
class
WidgetUnit
{
export
class
WidgetUnit
implements
OnInit
{
@
ViewChild
(
'
container
'
,{
read
:
ViewContainerRef
})
container
:
ViewContainerRef
@
ViewChild
(
'
emptyspan
'
,{
read
:
ElementRef
})
emtpy
:
ElementRef
...
...
@@ -22,6 +22,13 @@ export class WidgetUnit {
@
HostBinding
(
'
style.height
'
)
height
:
string
=
this
.
state
===
'
docked
'
?
null
:
'
0px
'
get
transform
(){
return
this
.
state
===
'
floating
'
?
`translate(
${
this
.
position
[
0
]}
px,
${
this
.
position
[
1
]}
px)`
:
`translate(0 , 0)`
}
public
canBeDocked
:
boolean
=
false
@
HostListener
(
'
mousedown
'
)
clicked
(){
this
.
clickedEmitter
.
emit
(
this
)
...
...
@@ -44,6 +51,10 @@ export class WidgetUnit {
public
cf
:
ComponentRef
<
WidgetUnit
>
public
widgetServices
:
WidgetServices
ngOnInit
(){
this
.
canBeDocked
=
typeof
this
.
widgetServices
.
dockedContainer
!==
'
undefined
'
}
/**
* @param {boolean}
* @description when new viewer is init, if this viewer will persist
...
...
@@ -131,10 +142,4 @@ export class WidgetUnit {
ev
.
dataTransfer
.
setDragImage
(
this
.
emtpy
.
nativeElement
,
0
,
0
)
}
get
transform
(){
return
this
.
state
===
'
floating
'
?
`translate(
${
this
.
position
[
0
]}
px,
${
this
.
position
[
1
]}
px)`
:
`translate(0 , 0)`
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/atlasViewer/widgetUnit/widgetUnit.template.html
+
1
−
1
View file @
9cf9dddb
...
...
@@ -19,7 +19,7 @@
</div>
</div>
<div
icons
>
<i
*ngIf =
"state === 'floating'"
<i
*ngIf =
"
canBeDocked &&
state === 'floating'"
(click) =
"dock($event)"
class =
"fas fa-window-minimize"
hoverable
></i>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment