refactor(network): Die Methode getAnnotationParams wurde aktualisiert, um die Anmerkung übersetzen und das Verhältnis ihrer Größe ändern zu können.
This commit is contained in:
@@ -204,10 +204,20 @@ async function logout() {
|
||||
});
|
||||
}
|
||||
|
||||
function getAnnotationParams() {
|
||||
function getAnnotationParams(leftInInch = 0, topInInch = 0, inchToPointFactor = 72) {
|
||||
return fetch(`${window.location.origin}/api/Config/Annotations`, {
|
||||
credentials: 'include',
|
||||
method: 'GET'
|
||||
})
|
||||
.then(res => res.json());
|
||||
.then(res => res.json())
|
||||
.then(annotParams => {
|
||||
for(var key in annotParams){
|
||||
var annot = annotParams[key];
|
||||
annot.width *= inchToPointFactor;
|
||||
annot.height *= inchToPointFactor;
|
||||
annot.left = (leftInInch + annot.left) * inchToPointFactor - annot.width / 2;
|
||||
annot.top = (topInInch + annot.top) * inchToPointFactor - annot.height / 2;
|
||||
}
|
||||
return annotParams;
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user