-
+
diff --git a/RobotApp.Client/wwwroot/js/canvas.js b/RobotApp.Client/wwwroot/js/canvas.js
index e956683..c8ab64b 100644
--- a/RobotApp.Client/wwwroot/js/canvas.js
+++ b/RobotApp.Client/wwwroot/js/canvas.js
@@ -5,12 +5,23 @@
};
}
+window.getElementBoundingRect = (element) => {
+ const rect = element.getBoundingClientRect();
+ return {
+ width: rect.width,
+ height: rect.height,
+ x: rect.x,
+ y: rect.y,
+ left: rect.left,
+ top: rect.top
+ };
+}
+
window.setCanvasSize = (canvas, width, height) => {
canvas.width = width;
canvas.height = height;
}
-// Image loading and caching functionality
window.imageCache = new Map();
window.preloadImage = (imagePath) => {
@@ -47,11 +58,6 @@ window.preloadImageFromUrl = (url, cacheKey) => {
img.onerror = (error) => {
reject(new Error(`Failed to load image from URL: ${url}`));
};
-
- // Don't set crossOrigin for same-origin requests
- // Only set it if you're loading from a different domain
- // img.crossOrigin = 'anonymous';
-
img.src = url;
});
};
diff --git a/RobotApp.sln b/RobotApp.sln
index 258b320..b17dbf7 100644
--- a/RobotApp.sln
+++ b/RobotApp.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
-VisualStudioVersion = 17.14.36511.14 d17.14
+VisualStudioVersion = 17.14.36511.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RobotApp", "RobotApp\RobotApp.csproj", "{BF0BB137-2EF9-4E1B-944E-9BF41C5284F7}"
EndProject
diff --git a/RobotApp/Controllers/ImagesController.cs b/RobotApp/Controllers/ImagesController.cs
index b1995f6..a46ae4a 100644
--- a/RobotApp/Controllers/ImagesController.cs
+++ b/RobotApp/Controllers/ImagesController.cs
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
-using RobotApp.Services;
namespace RobotApp.Controllers;
@@ -10,7 +9,7 @@ namespace RobotApp.Controllers;
public class ImagesController(Services.Logger Logger) : ControllerBase
{
[HttpGet]
- [Route("map")]
+ [Route("mapping")]
public async Task GetMapImage()
{
try