Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
directus-extension-svgmap-picker-interface
Advanced tools
Readme
This extension is under development, it may take breaking changes.
Selecting a value from a SVG Map box.
Basically it's intended to be a select-dropdown or checkboxes replacement, where is required to pick a value from predefined list, and is nice to have good visual feedback.
Example usages could be:
... etc
In your Directus installation root
npm install directus-extension-svgmap-picker-interface
Restart directus
You can use whatever SVGs you like, it is just necessery to have good way to select items (class names are good way to
go) and have data-value
attribute with desired values.
Yes, just use :hover
pseudo class for hovering effect and .active
class name for current selected item.
Just setup and ensure the data-value
is set to coresponding allowed ID of target collection.
Yes, you could benefit from the reusability and custom Directus extensions, so you could create your own packed version. Just take in mind that you still need to have this extension installed, even using custom bundles.
About how to do that, check the premade demo bundles on
demo maps. Every
of these is ready to be placed in your ./extensions/interfaces
Selector: .choice
SVG:
<svg width="250" height="50" xmlns="http://www.w3.org/2000/svg">
<!-- Custom styling using :hover and .active classes -->
<style>
.choice:hover path {
fill-opacity: .9;
}
.choice:hover path {
fill-opacity: .75;
}
.choice.active path {
stroke: black;
stroke-width: 2;
fill-opacity: 1;
}
</style>
<!-- Define selectable blocks -->
<g data-value="bue_pill" class="choice" title="The blue pill">
<path d="M130 26c0-11 9-20 20-20h72c11 0 20 9 20 20s-9 20-20 20h-72c-11 0-20-9-20-20z" fill="#426373"/>
<text font-size="20" y="34" x="151" fill="#B1FFFF">Blue Pill</text>
</g>
<g data-value="red_pill" class="choice" title="The red pill">
<path d="M7 26C7 15 16 6 27 6h72c11 0 20 9 20 20s-9 20-20 20H27C16 46 7 37 7 26z" fill="#805064"/>
<text font-size="20" y="34" x="29" fill="#FFAFCC">Red Pill</text>
</g>
</svg>
FAQs
> This extension is under development, it may take breaking changes.
The npm package directus-extension-svgmap-picker-interface receives a total of 48 weekly downloads. As such, directus-extension-svgmap-picker-interface popularity was classified as not popular.
We found that directus-extension-svgmap-picker-interface demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.