mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-19 23:14:47 +02:00
Fix transitions and multis
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { rebind } from '../../modules/util/rebind';
|
||||
import 'd3-selection-multi';
|
||||
import * as d3 from 'd3';
|
||||
|
||||
export function d3combobox() {
|
||||
@@ -71,7 +72,7 @@ export function d3combobox() {
|
||||
.insert('div', ':first-child')
|
||||
.datum(input.node())
|
||||
.attr('class', 'combobox')
|
||||
.style({
|
||||
.styles({
|
||||
position: 'absolute',
|
||||
display: 'block',
|
||||
left: '0px'
|
||||
@@ -232,7 +233,7 @@ export function d3combobox() {
|
||||
var node = attachTo ? attachTo.node() : input.node(),
|
||||
rect = node.getBoundingClientRect();
|
||||
|
||||
container.style({
|
||||
container.styles({
|
||||
'left': rect.left + 'px',
|
||||
'width': rect.width + 'px',
|
||||
'top': rect.height + rect.top + 'px'
|
||||
|
||||
@@ -40,7 +40,7 @@ export function MapillaryImages(projection, context, dispatch) {
|
||||
.transition()
|
||||
.duration(500)
|
||||
.style('opacity', 1)
|
||||
.each('end', debouncedRedraw);
|
||||
.on('end', debouncedRedraw);
|
||||
}
|
||||
|
||||
function hideLayer() {
|
||||
@@ -55,7 +55,7 @@ export function MapillaryImages(projection, context, dispatch) {
|
||||
.transition()
|
||||
.duration(500)
|
||||
.style('opacity', 0)
|
||||
.each('end', editOff);
|
||||
.on('end', editOff);
|
||||
}
|
||||
|
||||
function editOn() {
|
||||
|
||||
@@ -305,7 +305,7 @@ export function Background(context) {
|
||||
.transition()
|
||||
.duration(200)
|
||||
.style('right', '-300px')
|
||||
.each('end', function() {
|
||||
.on('end', function() {
|
||||
d3.select(this).style('display', 'none');
|
||||
});
|
||||
selection.on('mousedown.background-inside', null);
|
||||
|
||||
@@ -189,7 +189,7 @@ export function localized(field, context) {
|
||||
.style('margin-top', '10px')
|
||||
.style('max-height', '240px')
|
||||
.style('opacity', '1')
|
||||
.each('end', function() {
|
||||
.on('end', function() {
|
||||
d3.select(this)
|
||||
.style('max-height', '')
|
||||
.style('overflow', 'visible');
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ export function Help(context) {
|
||||
.transition()
|
||||
.duration(200)
|
||||
.style('right', '-500px')
|
||||
.each('end', function() {
|
||||
.on('end', function() {
|
||||
d3.select(this).style('display', 'none');
|
||||
});
|
||||
selection.on('mousedown.help-inside', null);
|
||||
|
||||
+1
-1
@@ -199,7 +199,7 @@ export function Info(context) {
|
||||
.transition()
|
||||
.duration(200)
|
||||
.style('opacity', 0)
|
||||
.each('end', function() {
|
||||
.on('end', function() {
|
||||
d3.select(this).style('display', 'none');
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -334,7 +334,7 @@ export function MapData(context) {
|
||||
.transition()
|
||||
.duration(200)
|
||||
.style('right', '-300px')
|
||||
.each('end', function() {
|
||||
.on('end', function() {
|
||||
d3.select(this).style('display', 'none');
|
||||
});
|
||||
selection.on('mousedown.map_data-inside', null);
|
||||
|
||||
@@ -261,7 +261,7 @@ export function MapInMap(context) {
|
||||
.transition()
|
||||
.duration(200)
|
||||
.style('opacity', 0)
|
||||
.each('end', function() {
|
||||
.on('end', function() {
|
||||
d3.select(this).style('display', 'none');
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -10,7 +10,7 @@ export function Toggle(show, callback) {
|
||||
.classed('hide', false)
|
||||
.transition()
|
||||
.style('opacity', show ? 1 : 0)
|
||||
.each('end', function() {
|
||||
.on('end', function() {
|
||||
d3.select(this)
|
||||
.classed('hide', !show)
|
||||
.style('opacity', null);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { getDimensions } from './dimensions';
|
||||
import { rebind } from '../../modules/util/rebind';
|
||||
import 'd3-selection-multi';
|
||||
import * as d3 from 'd3';
|
||||
|
||||
// Tooltips and svg mask used to highlight certain features
|
||||
@@ -14,7 +15,7 @@ export function d3curtain() {
|
||||
|
||||
surface = selection.append('svg')
|
||||
.attr('id', 'curtain')
|
||||
.style({
|
||||
.styles({
|
||||
'z-index': 1000,
|
||||
'pointer-events': 'none',
|
||||
'position': 'absolute',
|
||||
|
||||
Reference in New Issue
Block a user