mirror of
https://github.com/FoggedLens/iD.git
synced 2026-04-22 03:36:37 +02:00
small animation things.
This commit is contained in:
@@ -238,27 +238,29 @@ iD.ui.PresetGrid = function(context, entity) {
|
||||
.append('div')
|
||||
.attr('class','grid-button-wrap col4 grid-entry-wrap')
|
||||
.classed('category', function(d) { return !!d.members; })
|
||||
.classed('current', function(d) { return d === preset; })
|
||||
.append('button')
|
||||
.classed('current', function(d) { return d === preset; });
|
||||
|
||||
var buttonInner = entered.append('button')
|
||||
.attr('class', 'grid-entry')
|
||||
.on('click', choose);
|
||||
|
||||
entered.style('opacity', 0)
|
||||
buttonInner
|
||||
.style('opacity', 0)
|
||||
.transition()
|
||||
.style('opacity', 1);
|
||||
|
||||
entered.append('div')
|
||||
buttonInner.append('div')
|
||||
.attr('class', presetClass);
|
||||
|
||||
var geometry = entity.geometry(context.graph()),
|
||||
fallbackIcon = geometry === 'line' ? 'other-line' : 'marker-stroked';
|
||||
|
||||
entered.append('div')
|
||||
buttonInner.append('div')
|
||||
.attr('class', function(d) {
|
||||
return 'feature-' + (d.icon || fallbackIcon) + ' icon';
|
||||
});
|
||||
|
||||
var label = entered.append('div')
|
||||
var label = buttonInner.append('div')
|
||||
.attr('class','label')
|
||||
.text(name);
|
||||
|
||||
|
||||
+22
-2
@@ -25,14 +25,34 @@ iD.ui.Splash = function(context) {
|
||||
.text(t('splash.walkthrough'))
|
||||
.on('click', function() {
|
||||
d3.select(document.body).call(iD.ui.intro(context));
|
||||
modal.remove();
|
||||
modal
|
||||
.transition()
|
||||
.duration(200)
|
||||
.style('opacity','0')
|
||||
.remove();
|
||||
|
||||
modal.select('.modal')
|
||||
.transition()
|
||||
.duration(200)
|
||||
.style('top','0px')
|
||||
.remove();
|
||||
});
|
||||
|
||||
buttons.append('button')
|
||||
.attr('class', 'col6 action modal-section start')
|
||||
.text(t('splash.start'))
|
||||
.on('click', function() {
|
||||
modal.remove();
|
||||
modal
|
||||
.transition()
|
||||
.duration(200)
|
||||
.style('opacity','0')
|
||||
.remove();
|
||||
|
||||
modal.select('.modal')
|
||||
.transition()
|
||||
.duration(200)
|
||||
.style('top','0px')
|
||||
.remove();
|
||||
});
|
||||
|
||||
introModal.append('div')
|
||||
|
||||
Reference in New Issue
Block a user