Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix NaN positions for shapes when dragging them.#7470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
archmoj merged 9 commits intoplotly:masterfrommy-tien:fix-edit-shapes
Jul 21, 2025
Merged
Changes from1 commit
Commits
Show all changes
9 commits
Select commitHold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
WIP draw_newshape_test
  • Loading branch information
@my-tien
my-tien committedJul 17, 2025
commit13e3cc18ea153246210c569d30327cb981b51fcc
37 changes: 37 additions & 0 deletionstest/jasmine/tests/draw_newshape_test.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1426,6 +1426,43 @@ describe('Activate and edit editable shapes', function() {

.then(done, done.fail);
});

it('should be possible to drag shapes referencing non-categorical axes', function(done) {
Plotly.newPlot(gd, {
data: [
{
x: ["2015-02-01", "2015-02-02", "2015-02-03"],
y: [14, 17, 8],
mode: "line",
},
],
layout: {
xaxis: { title: { text: "Date" }, type: "date" },
dragmode: "drawline",
shapes: [
{
type: "rect",
xref: "x",
yref: "paper",
x0: "2015-02-02",
y0: 0,
x1: "2015-02-08",
y1: 1,
opacity: 0.2,
editable: true,
},
],
},
})
.then(function() { drag([[257.64, 370], [250, 300]]); }) // move lower left corner up and left
.then(function () {
var shapes = gd._fullLayout.shapes;
var obj = shapes[0]._input;
print(obj);
assertPos(obj.path, 'M250,300H1019V100H257.64Z');
})
.then(done, done.fail);
});
});
});

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp