Skip to content

Commit

Permalink
DBC22-1597: removed icon anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-oxd committed Jan 22, 2024
1 parent 7435096 commit bc2e227
Showing 1 changed file with 3 additions and 99 deletions.
102 changes: 3 additions & 99 deletions src/frontend/src/Components/data/featureStyleDefinitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,18 @@ import weatherConditionIconStaticMajor from '../../images/mapIcons/road-major-st
export const cameraStyles = {
static: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: cameraIconStatic,
}),
}),
hover: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: cameraIconHover,
}),
}),
active: new Style({
image: new Icon({
anchor: [102, 102],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: cameraIconActive,
}),
Expand All @@ -68,27 +59,18 @@ export const cameraStyles = {
export const closureStyles = {
static: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: closedIconStatic,
}),
}),
hover: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: closedIconHover,
}),
}),
active: new Style({
image: new Icon({
anchor: [102, 102],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: closedIconActive,
}),
Expand All @@ -100,29 +82,20 @@ export const eventStyles = {
incident: {
static: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: incidentIconStatic,
}),
}),

hover: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: incidentIconHover,
}),
}),

active: new Style({
image: new Icon({
anchor: [102, 102],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: incidentIconActive,
}),
Expand All @@ -132,29 +105,20 @@ export const eventStyles = {
major_incident: {
static: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: incidentIconStaticMajor,
}),
}),

hover: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: incidentIconHoverMajor,
}),
}),

active: new Style({
image: new Icon({
anchor: [102, 102],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: incidentIconActiveMajor,
}),
Expand All @@ -164,29 +128,20 @@ export const eventStyles = {
construction: {
static: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: constructionIconStatic,
}),
}),

hover: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: constructionIconHover,
}),
}),

active: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: constructionIconActive,
}),
Expand All @@ -196,29 +151,20 @@ export const eventStyles = {
major_construction: {
static: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: constructionIconStaticMajor,
}),
}),

hover: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: constructionIconHoverMajor,
}),
}),

active: new Style({
image: new Icon({
anchor: [102, 102],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: constructionIconActiveMajor,
}),
Expand All @@ -228,29 +174,20 @@ export const eventStyles = {
special_event: {
static: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: specialEventIconStatic,
}),
}),

hover: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: specialEventIconHover,
}),
}),

active: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: specialEventIconActive,
}),
Expand All @@ -260,29 +197,20 @@ export const eventStyles = {
major_special_event: {
static: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: specialEventIconStaticMajor,
}),
}),

hover: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: specialEventIconHoverMajor,
}),
}),

active: new Style({
image: new Icon({
anchor: [102, 102],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: specialEventIconActiveMajor,
}),
Expand All @@ -292,29 +220,20 @@ export const eventStyles = {
weather_condition: {
static: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: weatherConditionIconStatic,
}),
}),

hover: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: weatherConditionIconHover,
}),
}),

active: new Style({
image: new Icon({
anchor: [102, 102],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: weatherConditionIconActive,
}),
Expand All @@ -324,29 +243,20 @@ export const eventStyles = {
major_weather_condition: {
static: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: weatherConditionIconStaticMajor,
}),
}),

hover: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: weatherConditionIconHoverMajor,
}),
}),

active: new Style({
image: new Icon({
anchor: [102, 102],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: weatherConditionIconActiveMajor,
}),
Expand Down Expand Up @@ -379,27 +289,21 @@ segments: {
export const ferryStyles = {
static: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',



scale: 0.25,
src: ferryIconStatic,
}),
}),
hover: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: ferryIconHover,
}),
}),
active: new Style({
image: new Icon({
anchor: [88, 88],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
scale: 0.25,
src: ferryIconActive,
}),
Expand Down

0 comments on commit bc2e227

Please sign in to comment.