Skip to content

Commit

Permalink
Merge pull request origo-map#1753 from origo-map/named-target
Browse files Browse the repository at this point in the history
feature: make it possible for named target for attribute links
  • Loading branch information
johnnyblasta authored Apr 27, 2023
2 parents de6a4b9 + 1c93b79 commit 2f01fb3
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/getattributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@ function parseUrl(urlattr, feature, attribute, attributes, map, linktext) {
} else if (attribute.target === 'modal-full') {
aTarget = 'modal-full';
aCls = 'o-identify-link-modal';
} else if (attribute.target === '_self') {
aTarget = '_self';
} else if (attribute.target === '_top') {
aTarget = '_top';
} else if (attribute.target === '_parent') {
aTarget = '_parent';
} else {
aTarget = attribute.target ? attribute.target : '_blank';
}
val = `<a class="${aCls}" target="${aTarget}" href="${url}" title="${aTargetTitle}">${text}</a>`;
return val;
Expand Down

0 comments on commit 2f01fb3

Please sign in to comment.