feat(minimap): add scaling
This commit is contained in:
Vendored
+3
-2
@@ -33631,7 +33631,8 @@
|
|||||||
width: 200
|
width: 200
|
||||||
};
|
};
|
||||||
var index = (function (_ref) {
|
var index = (function (_ref) {
|
||||||
var style = _ref.style,
|
var _ref$style = _ref.style,
|
||||||
|
style = _ref$style === void 0 ? {} : _ref$style,
|
||||||
className = _ref.className,
|
className = _ref.className,
|
||||||
_ref$bgColor = _ref.bgColor,
|
_ref$bgColor = _ref.bgColor,
|
||||||
bgColor = _ref$bgColor === void 0 ? '#f8f8f8' : _ref$bgColor,
|
bgColor = _ref$bgColor === void 0 ? '#f8f8f8' : _ref$bgColor,
|
||||||
@@ -33668,7 +33669,7 @@
|
|||||||
var x = pos.x * state.transform[2] + transformX;
|
var x = pos.x * state.transform[2] + transformX;
|
||||||
var y = pos.y * state.transform[2] + transformY;
|
var y = pos.y * state.transform[2] + transformY;
|
||||||
ctx.fillStyle = nodeColor;
|
ctx.fillStyle = nodeColor;
|
||||||
ctx.fillRect(x * scaleFactor, y * scaleFactor, n.__rg.width * scaleFactor, n.__rg.height * scaleFactor);
|
ctx.fillRect(x * scaleFactor, y * scaleFactor, n.__rg.width * scaleFactor * state.transform[2], n.__rg.height * scaleFactor * state.transform[2]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [nodePositions, state.transform, height]);
|
}, [nodePositions, state.transform, height]);
|
||||||
|
|||||||
@@ -42266,7 +42266,8 @@ var baseStyle = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var _default = function _default(_ref) {
|
var _default = function _default(_ref) {
|
||||||
var style = _ref.style,
|
var _ref$style = _ref.style,
|
||||||
|
style = _ref$style === void 0 ? {} : _ref$style,
|
||||||
className = _ref.className,
|
className = _ref.className,
|
||||||
_ref$bgColor = _ref.bgColor,
|
_ref$bgColor = _ref.bgColor,
|
||||||
bgColor = _ref$bgColor === void 0 ? '#f8f8f8' : _ref$bgColor,
|
bgColor = _ref$bgColor === void 0 ? '#f8f8f8' : _ref$bgColor,
|
||||||
@@ -42303,7 +42304,7 @@ var _default = function _default(_ref) {
|
|||||||
var x = pos.x * state.transform[2] + transformX;
|
var x = pos.x * state.transform[2] + transformX;
|
||||||
var y = pos.y * state.transform[2] + transformY;
|
var y = pos.y * state.transform[2] + transformY;
|
||||||
ctx.fillStyle = nodeColor;
|
ctx.fillStyle = nodeColor;
|
||||||
ctx.fillRect(x * scaleFactor, y * scaleFactor, n.__rg.width * scaleFactor, n.__rg.height * scaleFactor);
|
ctx.fillRect(x * scaleFactor, y * scaleFactor, n.__rg.width * scaleFactor * state.transform[2], n.__rg.height * scaleFactor * state.transform[2]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [nodePositions, state.transform, height]);
|
}, [nodePositions, state.transform, height]);
|
||||||
@@ -42853,7 +42854,7 @@ var parent = module.bundle.parent;
|
|||||||
if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
|
if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
|
||||||
var hostname = "" || location.hostname;
|
var hostname = "" || location.hostname;
|
||||||
var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
|
var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
|
||||||
var ws = new WebSocket(protocol + '://' + hostname + ':' + "54719" + '/');
|
var ws = new WebSocket(protocol + '://' + hostname + ':' + "60876" + '/');
|
||||||
|
|
||||||
ws.onmessage = function (event) {
|
ws.onmessage = function (event) {
|
||||||
checkedAssets = {};
|
checkedAssets = {};
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -212,7 +212,7 @@ var parent = module.bundle.parent;
|
|||||||
if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
|
if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
|
||||||
var hostname = "" || location.hostname;
|
var hostname = "" || location.hostname;
|
||||||
var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
|
var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
|
||||||
var ws = new WebSocket(protocol + '://' + hostname + ':' + "54719" + '/');
|
var ws = new WebSocket(protocol + '://' + hostname + ':' + "60876" + '/');
|
||||||
|
|
||||||
ws.onmessage = function (event) {
|
ws.onmessage = function (event) {
|
||||||
checkedAssets = {};
|
checkedAssets = {};
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -41,9 +41,9 @@ export default ({ style = {}, className, bgColor = '#f8f8f8', nodeColor = '#ddd'
|
|||||||
ctx.fillRect(
|
ctx.fillRect(
|
||||||
(x * scaleFactor),
|
(x * scaleFactor),
|
||||||
(y * scaleFactor),
|
(y * scaleFactor),
|
||||||
n.__rg.width * scaleFactor,
|
n.__rg.width * scaleFactor * state.transform[2],
|
||||||
n.__rg.height * scaleFactor)
|
n.__rg.height * scaleFactor * state.transform[2]
|
||||||
;
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [nodePositions, state.transform, height])
|
}, [nodePositions, state.transform, height])
|
||||||
|
|||||||
Reference in New Issue
Block a user