Skip to content

Commit

Permalink
- 1.20.2-d28 tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro Burato committed Dec 2, 2016
1 parent 5eec9bd commit 7a7f8d3
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 27 deletions.
32 changes: 20 additions & 12 deletions dist/plotly-ion.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* plotly.js (ion) v1.20.2-d27
* plotly.js (ion) v1.20.2-d28
* Copyright 2012-2016, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
Expand Down Expand Up @@ -26164,7 +26164,7 @@ exports.svgAttrs = {
var Plotly = require('./plotly');

// package version injected by `npm run preprocess`
exports.version = '1.20.2-d27';
exports.version = '1.20.2-d28';

// inject promise polyfill
require('es6-promise').polyfill();
Expand Down Expand Up @@ -27276,6 +27276,7 @@ function getLocationId(locationmode, location) {
}

function countryNameToISO3(countryName) {
if(countryName == undefined) return false;
for(var i = 0; i < countryIds.length; i++) {
var iso3 = countryIds[i],
regex = new RegExp(countryRegex[iso3]);
Expand Down Expand Up @@ -42774,8 +42775,8 @@ proto.plot = function(geoCalcData, fullLayout, promises) {
Fx.loneUnhover(fullLayout._toppaper);
});

_this.framework.on('click', function() {
Fx.click(_this.graphDiv, { target: true });
_this.framework.on('mousedown', function() {
Fx.click(_this.graphDiv, window.event || { target: true });
});

topojsonNameNew = topojsonUtils.getTopojsonName(geoLayout);
Expand Down Expand Up @@ -43017,9 +43018,9 @@ proto.adjustLayout = function(geoLayout, graphSize) {
this.framework.select('.bglayer').select('rect')
.attr({
width: geoLayout._width,
height: geoLayout._height
})
.call(Color.fill, geoLayout.bgcolor);
height: geoLayout._height,
style: 'fill-opacity: 0'
});

this.xaxis._offset = left;
this.xaxis._length = geoLayout._width;
Expand Down Expand Up @@ -44485,13 +44486,15 @@ function zoomScoped(geo, projLayout) {
var projection = geo.projection,
zoom = initZoom(projection, projLayout);

var defaultScale = projection.scale();
function handleZoomstart() {
d3.select(this).style(zoomstartStyle);
}

function handleZoom() {
zoom.scale(Math.max(defaultScale, d3.event.scale));
projection
.scale(d3.event.scale)
.scale(Math.max(defaultScale, d3.event.scale))
.translate(d3.event.translate);

geo.render();
Expand All @@ -44514,6 +44517,7 @@ function zoomNonClipped(geo, projLayout) {
var projection = geo.projection,
zoom = initZoom(projection, projLayout);

var defaultScale = projection.scale();
var INSIDETOLORANCEPXS = 2;

var mouse0, rotate0, translate0, lastRotate, zoomPoint,
Expand Down Expand Up @@ -44546,9 +44550,14 @@ function zoomNonClipped(geo, projLayout) {
return;
}

projection.scale(d3.event.scale);
projection.scale(Math.max(defaultScale, d3.event.scale));

projection.translate([translate0[0], d3.event.translate[1]]);
var availableSpace = (projection.scale()*Math.PI);
var min = translate0[0]-availableSpace/2;
var max = availableSpace/2;
var translateTo = Math.min(Math.max(d3.event.translate[1], min), max);
projection.translate([translate0[0], translateTo]);
zoom.translate([translate0[0], translateTo]);

if(!zoomPoint) {
mouse0 = mouse1;
Expand Down Expand Up @@ -52329,8 +52338,7 @@ module.exports = function plot(gd, cdpie) {
sliceTop
.on('mouseover', handleMouseOver)
.on('mouseout', handleMouseOut)
.on('click', handleClick)
.on('contextmenu', handleClick);
.on('mousedown', handleClick);

if(trace.pull) {
var pull = +(Array.isArray(trace.pull) ? trace.pull[pt.i] : trace.pull) || 0;
Expand Down
22 changes: 11 additions & 11 deletions dist/plotly-ion.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plotly.js",
"version": "1.20.2-d27",
"version": "1.20.2-d28",
"description": "The open source javascript graphing library that powers plotly",
"license": "MIT",
"main": "./lib/index.js",
Expand Down
2 changes: 1 addition & 1 deletion sample/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<head>
<!-- Plotly.js -->
<script src="../dist/plotly-cartesian.js" charset="utf-8"></script>
<script src="../dist/plotly-ion.js" charset="utf-8"></script>
<style></style>
</head>

Expand Down
2 changes: 1 addition & 1 deletion src/assets/geo_assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ var saneTopojson = require('sane-topojson');


// package version injected by `npm run preprocess`
exports.version = '1.20.2-d27';
exports.version = '1.20.2-d28';

exports.topojson = saneTopojson;
2 changes: 1 addition & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
var Plotly = require('./plotly');

// package version injected by `npm run preprocess`
exports.version = '1.20.2-d27';
exports.version = '1.20.2-d28';

// inject promise polyfill
require('es6-promise').polyfill();
Expand Down

0 comments on commit 7a7f8d3

Please sign in to comment.