Skip to content
Snippets Groups Projects
Commit d16796e6 authored by fsdavid's avatar fsdavid Committed by Xiao Gui
Browse files

upgraded for mobile context menu etc.

parent 56ccfea2
No related branches found
No related tags found
No related merge requests found
......@@ -25,13 +25,10 @@ export class FixedMouseContextualContainerDirective {
}
public show(){
if ((window.innerWidth - this.mousePos[0]) > 220) {
this.transform = `translate(${this.mousePos.map(v => v.toString() + 'px').join(', ')})`
} else {
if ((window.innerWidth - this.mousePos[0]) < 220) {
this.mousePos[0] = window.innerWidth-220
this.transform = `translate(${this.mousePos.map(v => v.toString() + 'px').join(', ')})`
}
// this.transform = `translate(${this.mousePos.map(v => v.toString() + 'px').join(', ')})`
this.transform = `translate(${this.mousePos.map(v => v.toString() + 'px').join(', ')})`
this.styleDisplay = 'block'
this.isShown = true
this.onShow.emit()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment