Skip to content

Commit

Permalink
Merge 3dd8c95 into 7f97fa0
Browse files Browse the repository at this point in the history
  • Loading branch information
Trufi committed Mar 4, 2015
2 parents 7f97fa0 + 3dd8c95 commit a8aa376
Show file tree
Hide file tree
Showing 26 changed files with 189 additions and 164 deletions.
4 changes: 3 additions & 1 deletion build/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ var config = {
output: './public/doc'
},

copyright: fs.readFileSync('./src/copyright.js')
copyright: fs.readFileSync('./src/copyright.js'),

coreModules: ['Leaflet', 'DGCore', 'DGCustomization']
};

config.appConfig = getAppConfig();
Expand Down
32 changes: 25 additions & 7 deletions build/deps.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,36 @@ var deps = {
deps: ['DGCore']
},

DGPopup: {
desc: '2GIS Popup module',
src: [
'DGPopup/skin/basic/skin.config.js',
'../vendors/baron/baron.js',
'DGPopup/src/DGPopup.js'
],
less: {
all: [
'DGPopup/skin/{skin}/less/leaflet.less',
'../vendors/baron/baron.css',
'DGPopup/skin/{skin}/less/scroller.less',
'DGPopup/skin/{skin}/less/dg-popup.less'
],
ie: [
'DGPopup/skin/{skin}/less/leaflet.ie.less',
'DGPopup/skin/{skin}/less/dg-popup.ie.less',
'DGPopup/skin/{skin}/less/dg-schedule.ie.less'
]
},
deps: ['DGCore']
},

DGCustomization: {
desc: 'LeafLet customization module',
src: [
'DGCustomization/skin/basic/skin.config.js',
'../vendors/baron/baron.js',
'DGCustomization/src/DGCustomization.js',
'DGCustomization/src/DGMap.js',
'DGCustomization/src/DGMap.BaseLayer.js',
'DGCustomization/src/DGPopup.js',
'DGCustomization/src/DGZoom.js',
'DGCustomization/lang/DGZoom/ru.js',
'DGCustomization/lang/DGZoom/it.js',
Expand All @@ -75,14 +96,11 @@ var deps = {
'../vendors/baron/baron.css',
'DGCustomization/skin/{skin}/less/scroller.less',
'DGCustomization/skin/{skin}/less/dg-zoom.less',
'DGCustomization/skin/{skin}/less/dg-customization.less',
'DGCustomization/skin/{skin}/less/dg-popup.less',
'DGCustomization/skin/{skin}/less/dg-firm-card.less'
'DGCustomization/skin/{skin}/less/dg-customization.less'
],
ie: [
'DGCustomization/skin/{skin}/less/leaflet.ie.less',
'DGCustomization/skin/{skin}/less/dg-customization.ie.less',
'DGCustomization/skin/{skin}/less/dg-popup.ie.less',
'DGCustomization/skin/{skin}/less/dg-schedule.ie.less'
]
},
Expand Down Expand Up @@ -222,7 +240,7 @@ var deps = {
'../vendors/firmcard/src/Schedule.js',
'../vendors/firmcard/src/Dictionary.js'
],
deps: ['DGAjax', 'DGCore', 'DGDust', 'DGLocale', 'DGPoi', 'DGEntrance', 'DGProjectDetector']
deps: ['DGAjax', 'DGCore', 'DGDust', 'DGLocale', 'DGPoi', 'DGEntrance', 'DGProjectDetector', 'DGPopup']
},

DGDust: {
Expand Down
9 changes: 7 additions & 2 deletions build/gulp-deps.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var init = function (config) {
var packages = config.packages;

// Generates a list of modules by pkg
function getModulesList(pkg, modules) { //(String|Null)->Array
function getModulesList(pkg, modules, isLeaflet) { //(String|Null)->Array
modules = modules || config.source.deps;

var modulesListOrig = [];
Expand Down Expand Up @@ -35,6 +35,10 @@ var init = function (config) {
modulesListOrig = modulesListOrig.concat(Object.keys(modules));
}

if (!isLeaflet) {
modulesListOrig = modulesListOrig.concat(config.coreModules);
}

function processModule(name) {
if (config.deprecatedModules.indexOf(name) != -1) {
return;
Expand Down Expand Up @@ -63,8 +67,9 @@ var init = function (config) {
var source = config[options.source || 'source'];
var modules = source.deps;
var sourcePath = source.path;
var isLeaflet = options.source === 'leaflet';

return getModulesList(options.pkg, modules)
return getModulesList(options.pkg, modules, isLeaflet)
.map(function (name) {
return modules[name];
})
Expand Down
2 changes: 1 addition & 1 deletion build/packs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var packages = {
basic: {
name: 'Basic package',
desc: 'Provides basic functionality: map, markers, popups, geometries',
modules: ['DGCustomization', 'DGFullScreen', 'DGAttribution', 'DGAjax']
modules: ['DGCustomization', 'DGFullScreen', 'DGAttribution', 'DGAjax', 'DGPopup']
},

full: {
Expand Down
139 changes: 0 additions & 139 deletions src/DGCustomization/skin/basic/less/leaflet.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,150 +15,11 @@
cursor: move;
}

.leaflet-popup-tip-container {
height: 0;
}
.leaflet-popup-tip {
display: none;
}

.leaflet-control a:focus,
.leaflet-control a {
outline: none !important;
}

.leaflet-popup-content-wrapper {
overflow: hidden;
padding: 0;
min-width: 60px;
min-height: 50px;
border: 0;
border-radius: 3px;
background: none;
box-shadow: none;
color: #e6e6e6;
font-size: 14px;
transition:
opacity ease-out .2s,
max-height ease-out .2s,
height ease-out .2s;
transform-origin: 50% 100%;

// Чтобы текст не заезжал под кнопку закрытия. Для не инлайновых боксов
// можно получить нужное поведение применяя к ним overflow:hidden или display:(inline-block|table) .
&:before {
float: right;
width: 30px;
// popupPadding + 1 , первая строчка текста уже среагирует на кнопку,
// но минимум проблем с не инлайновыми боксами
height: 17px;
content: '';
}
}
.leaflet-popup-content {
position: relative;
margin: 16px;
width: auto;
line-height: 1.4;
}

.leaflet-popup a {
outline: none;
}

.leaflet-popup-content p {
margin: 0;
}

.leaflet-popup-scrolled {
overflow: visible;
border: 0;
}

.leaflet-popup-inner {
position: relative;
z-index: 0;
}

.leaflet-popup_show_true {
transition:
transform ease-in-out .2s,
opacity ease-in-out .2s,
height ease-out .2s;
transform: scale(1);
}

.leaflet-popup_show_false {
opacity: 0 !important;
transition: all ease-in-out .1s;
transform: scale(.2);
}

/* Коллаут показался, но контент ещё не загрузился */
.leaflet-popup_preloader_true {
width: 384px;
height: 52px;
}

/* В коллауте ошибка вместо контента */
.leaflet-popup_error_true {}

.leaflet-map-pane .leaflet-popup-tip-container {
position: absolute;
left: 50%;
margin-left: -29px;
top: auto;
bottom: -47px;
width: 58px;
height: 47px;
background-repeat: no-repeat;
pointer-events: none;
}
.leaflet-popup-tip {
display: none;
}

.leaflet-popup-tip-container_svg {
.notRepeatableBg('DGCustomization__popupShadow', true);
background-position: 50% 95%;
background-size: 36px 12px;
}

.leaflet-container a.leaflet-popup-close-button {
position: absolute;
top: 3px;
right: 3px;
z-index: 1;
overflow: hidden;
padding: 0;
width: 30px;
height: 30px;
text-align: center;
font-weight: normal;
font-size: 18px;
line-height: 30px;
cursor: pointer;

.no-touch &:hover {
border-radius: 2px;
transition: all .2s;
}

&:active {
color: #777777;
}

&:after {
position: absolute;
top: -3px;
right: -5px;
z-index: 2;
width: 40px;
height: 40px;
content: '';
}
}

.leaflet-container .leaflet-control-attribution {
background-color: transparent;
box-shadow: none;
Expand Down
17 changes: 5 additions & 12 deletions src/DGCustomization/skin/basic/skin.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
DG.configTheme = {
balloonOptions: {
offset: {
x: 1,
y: -43
}
},
DG.configTheme = DG.configTheme || {};

markersData: {
iconSize: [22, 34],
className: 'dg-customization__marker dg-customization__marker_type_mushroom',
iconAnchor: [10, 32]
}
DG.configTheme.markersData = {
iconSize: [22, 34],
className: 'dg-customization__marker dg-customization__marker_type_mushroom',
iconAnchor: [10, 32]
};
File renamed without changes.

0 comments on commit a8aa376

Please sign in to comment.