Skip to content

Commit

Permalink
fix area links for Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
mracsys committed Apr 21, 2021
1 parent 3702ddb commit a11bd24
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
5 changes: 1 addition & 4 deletions src/LinkedEntrance.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class LinkedEntrance extends React.Component {
let interiors = ['interior','specialInterior','grotto','grave','dungeon'];
let oneWayTypes = ['spawn','warpsong','owldrop'];
let otherEntrances = [];
const preventDefault = (event) => event.preventDefault();
if (this.props.connector === false) {
if ((interiors.includes(this.props.allAreas.entrances[reverseLink].type) &&
(oneWayTypes.includes(oEntrance.type) || this.props.decoupled) &&
Expand All @@ -80,9 +79,7 @@ class LinkedEntrance extends React.Component {
<div className={this.props.classes.entranceContainer} key={this.props.entrance + "label"}>
{ this.props.forceVisible ? <SubdirectoryArrowRightIcon /> : null }
<Typography variant="body1" component="h1" className={this.props.classes.entranceLabel}>
<Link className={this.props.classes.entranceAnchor} color="inherit" id={this.props.entrance} onClick={preventDefault}>
{this.buildEntranceName(this.props.entrance)}
</Link>
{this.buildEntranceName(this.props.entrance)}
</Typography>
<Link
color="inherit"
Expand Down
7 changes: 5 additions & 2 deletions src/Tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,18 @@ const useStyles = (theme) => ({
},
entranceAnchor: {
textDecoration: 'none',
height: 0,
position: "relative",
top: -theme.spacing(10),
"&:hover": {
textDecoration: 'none',
cursor: 'default',
},
"&:before": {
content: '""',
display: "block",
height: theme.spacing(10),
marginTop: -theme.spacing(10)
//height: theme.spacing(10),
//marginTop: -theme.spacing(10),
}
},
entranceAnchorFakeText: {
Expand Down
6 changes: 1 addition & 5 deletions src/UnlinkedEntrance.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Typography from '@material-ui/core/Typography';
import FormControl from '@material-ui/core/FormControl';
import Select from '@material-ui/core/Select';
import SubdirectoryArrowRightIcon from '@material-ui/icons/SubdirectoryArrowRight';
import Link from '@material-ui/core/Link';


class UnLinkedEntrance extends React.Component {
Expand Down Expand Up @@ -41,14 +40,11 @@ class UnLinkedEntrance extends React.Component {
render() {
let entrancePool = this.selectEntrancePool(this.props.entrance);
let entranceList = this.props.allAreas.entrances;
const preventDefault = (event) => event.preventDefault();
return (
<div className={this.props.classes.entranceContainer} key={this.props.ekey}>
{ this.props.forceVisible ? <SubdirectoryArrowRightIcon /> : null }
<Typography variant="body1" component="h1" color="error" className={this.props.classes.entranceLabel}>
<Link className={this.props.classes.entranceAnchor} color="inherit" id={this.props.entrance} onClick={preventDefault}>
{this.buildEntranceName(this.props.entrance)}
</Link>
{this.buildEntranceName(this.props.entrance)}
</Typography>
<FormControl className={this.props.classes.entranceMenuControl}>
<Select className={this.props.classes.entranceMenu} native displayEmpty id={this.props.entrance + "select"} onChange={this.props.handleLink} name={this.props.entrance}>
Expand Down

0 comments on commit a11bd24

Please sign in to comment.