Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
community
pount
pount-front
Commits
8068a352
Commit
8068a352
authored
Sep 20, 2021
by
Jean Rabreau
Browse files
✅
restore centerAndScale method
parent
5e799b5b
Pipeline
#60596
passed with stages
in 4 minutes and 24 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
public/static/stylesheet/vendor/vcg.isti.cnr.it/relight.css
View file @
8068a352
...
...
@@ -59,7 +59,7 @@
position
:
absolute
;
top
:
10px
;
right
:
10px
;
background-color
:
rgb
(
255
,
255
,
255
,
0.1
);
background-color
:
rgb
a
(
255
,
255
,
255
,
0.1
);
transition
:
opacity
1s
ease
;
opacity
:
1.0
;
}
...
...
src/assets/relight/relight-canvas.js
View file @
8068a352
...
...
@@ -247,8 +247,8 @@ centerAndScale: function(dt) {
const
zoom
=
Math
.
pow
(
2
,
t
.
pos
.
z
);
const
scale
=
Math
.
max
(
zoom
*
(
box
[
2
]
-
box
[
0
])
/
t
.
canvas
.
width
,
zoom
*
(
box
[
3
]
-
box
[
1
])
/
t
.
canvas
.
height
);
const
z
=
Math
.
log
(
scale
)
/
Math
.
LN2
;
//
t.setPosition(dt, (box[2] + box[0])/2, (box[3] + box[1])/2, z, t.pos.a);
t
.
setPosition
(
dt
,
0
,
0
,
0
,
0
);
t
.
setPosition
(
dt
,
(
box
[
2
]
+
box
[
0
])
/
2
,
(
box
[
3
]
+
box
[
1
])
/
2
,
z
,
t
.
pos
.
a
);
//
t.setPosition(dt, 0, 0, 0, 0);
},
pan
:
function
(
dt
,
dx
,
dy
)
{
//dx and dy expressed as pixels in the current size!
...
...
src/assets/relight/relight-interface.js
View file @
8068a352
...
...
@@ -108,7 +108,7 @@ const RelightViewer = function (div, options = {}) {
document
.
onmousewheel
!==
undefined
?
"
mousewheel
"
:
// Webkit and IE support at least "mousewheel"
"
DOMMouseScroll
"
;
// older Firefox
t
.
canvas
.
addEventListener
(
support
,
function
(
e
)
{
t
.
mousewheel
(
e
);
},
false
);
window
.
addEventListener
(
'
resize
'
,
function
(
/*event*/
)
{
t
.
resize
(
canvas
.
offsetWidth
,
canvas
.
offsetHeight
);
if
(
options
.
scale
)
t
.
updateScale
();
t
.
updatePagemap
();
});
window
.
addEventListener
(
'
resize
'
,
function
(
/*event*/
)
{
const
el
=
canvas
.
parentElement
.
parentElement
;
t
.
resize
(
el
.
offsetWidth
,
el
.
offsetHeight
);
if
(
options
.
scale
)
t
.
updateScale
();
t
.
updatePagemap
();
});
t
.
canvas
.
addEventListener
(
'
contextmenu
'
,
function
(
e
)
{
e
.
preventDefault
();
return
false
;
});
...
...
src/components/renderer/file/Rti.vue
View file @
8068a352
...
...
@@ -36,7 +36,7 @@ export default {
}],
fit
:
true
,
bounded
:
true
,
zbounded
:
tru
e
,
zbounded
:
fals
e
,
maxzoom
:
-
4
,
minzoom
:
100
,
pos
:
{
x
:
0
,
y
:
0
,
z
:
0
,
a
:
0
},
...
...
@@ -48,8 +48,8 @@ export default {
this
.
relightViewer
=
new
RelightViewer
(
'
.relight
'
,
options
)
const
relightDiv
=
this
.
$el
this
.
relightViewer
.
resize
(
relightDiv
.
clientWidth
,
relightDiv
.
clientHeight
)
const
container
=
this
.
$el
this
.
relightViewer
.
resize
(
container
.
clientWidth
,
container
.
clientHeight
)
},
}
</
script
>
...
...
src/store/item.js
View file @
8068a352
...
...
@@ -252,7 +252,7 @@ const Item = {
formData
.
append
(
"
Content-Type
"
,
file
.
type
)
formData
.
append
(
"
file
"
,
file
)
return
authority
.
post
(
`items/
${
itemId
}
/mediafiles/rti/`
,
`items/
${
itemId
}
/mediafiles/
upload_
rti/`
,
formData
).
then
(
response
=>
{
commit
(
'
ADD_MEDIA_FILE
'
,
response
.
data
)
...
...
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