
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
@dvhb/metro
Advanced tools
**@dvhb/metro** - библиотека для отображения схемы метрополитена. Позволяет выбирать станции на карте и отображать информацию о них.
@dvhb/metro - библиотека для отображения схемы метрополитена. Позволяет выбирать станции на карте и отображать информацию о них.
http://dvhbru.github.io/metro/
npm i @dvhb/metro --save
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.min.js"></script>
<script type="text/javascript" src="dvhb_metro.min.js"></script>
<div metro stations="stations" on-select="showInfo">
<div metro-info offset="{top: 20}">
<b>{{station.name}}</b>
<i>{{station.info}}</i>
</div>
</div>
angular
.module('App', ['dvhbMetro'])
.controller('MainCtrl', function ($scope) {
$scope.stations = {
"Курская (Кольцевая)": "ТЦ Атриум, 3 эт., с 9:00 до 21:00",
"Фили": "ТЦ Филёвский, 1 эт., с 10:00 до 21:00",
"Войковская": "ТЦ Войковский, 2 эт., с 8:00 до 22:00",
"Спартак": "ТЦ Коллизей, 1 эт., с 8:00 до 22:00"
};
$scope.station = {};
$scope.showInfo = function (names, position) {
$scope.station = {
name: names[0],
info: $scope.stations[names[0]]
};
}
})
Аттрибут | Тип | Описание |
---|---|---|
stations | `Array | Object` |
on-select | Function(names, coords) | функция, которая будет вызвана при выборе станции. |
map-url | String | ссылка на svg с картой |
Всплывающее окно с информацией о выбранной станции
Аттрибут | Тип | Описание |
---|---|---|
offset | {top: Number, left: Number} | отступ от позиции станции |
Дизайн карты метро © Студия Артемия Лебедева
FAQs
**@dvhb/metro** - библиотека для отображения схемы метрополитена. Позволяет выбирать станции на карте и отображать информацию о них.
We found that @dvhb/metro demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.