Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JM_MATH01
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
JM_MATH01
Commits
b0dc80e3
Commit
b0dc80e3
authored
Nov 20, 2021
by
liujiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: custom formula input
parent
5c209d10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
formula-input.component.ts
src/app/common/formula-input/formula-input.component.ts
+8
-7
No files found.
src/app/common/formula-input/formula-input.component.ts
View file @
b0dc80e3
...
@@ -67,17 +67,18 @@ export class FormulaInputComponent implements OnInit, OnChanges, OnDestroy, Afte
...
@@ -67,17 +67,18 @@ export class FormulaInputComponent implements OnInit, OnChanges, OnDestroy, Afte
window
.
__tmp_fp_input_model__
=
this
;
window
.
__tmp_fp_input_model__
=
this
;
const
rect
=
this
.
inputEl
.
nativeElement
.
getBoundingClientRect
();
const
rect
=
this
.
inputEl
.
nativeElement
.
getBoundingClientRect
();
const
fb
=
document
.
getElementById
(
this
.
FB_id
);
const
fb
=
document
.
getElementById
(
this
.
FB_id
);
fb
.
style
.
position
=
'
absolute
'
;
fb
.
style
.
position
=
'
fixed
'
;
let
left
=
rect
.
left
+
rect
.
width
;
let
top
=
rect
.
top
;
// @ts-ignore
// @ts-ignore
const
padWidth
=
$
(
'
#
'
+
this
.
FB_id
).
outerWidth
()
*
.
8
;
const
padWidth
=
$
(
'
#
'
+
this
.
FB_id
).
outerWidth
()
*
.
8
;
// @ts-ignore
// @ts-ignore
const
padHeight
=
$
(
'
#
'
+
this
.
FB_id
).
outerHeight
()
*
.
8
;
// @ts-ignore
const
ww
=
$
(
window
).
innerWidth
();
const
ww
=
$
(
window
).
innerWidth
();
if
((
left
+
padWidth
)
>
ww
)
{
// @ts-ignore
left
=
ww
-
padWidth
;
const
hh
=
$
(
window
).
innerHeight
();
top
=
top
+
rect
.
height
;
const
left
=
(
ww
-
padWidth
)
/
2
;
}
const
top
=
(
hh
-
padHeight
)
/
2
;
console
.
log
(
'
left
'
,
left
);
console
.
log
(
'
left
'
,
left
);
fb
.
style
.
left
=
left
+
'
px
'
;
fb
.
style
.
left
=
left
+
'
px
'
;
fb
.
style
.
top
=
top
+
'
px
'
;
fb
.
style
.
top
=
top
+
'
px
'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment