Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
aa58118
replace forEach with for-loop over ['x', 'y']
etpinard Apr 28, 2017
8b8bdea
don't (uselessly) add data-index to ann text+bg & arrow groups
etpinard Apr 28, 2017
1a8f1ed
don't (uselessly) add annotation class to ann text group inner
etpinard Apr 28, 2017
f4b14e6
fine tune annotation arrow selector
etpinard Apr 28, 2017
4dc16e4
use ax.?2? while composing convert methods
etpinard Apr 28, 2017
8e6ab7d
split annotation drawOne into drawRaw
etpinard Apr 28, 2017
c5f6eb2
introduce 3D annotations
etpinard Apr 28, 2017
b7ab656
don't try to edit x,y,z positions for 3D annotations
etpinard Apr 28, 2017
fbdcee8
Merge branch 'master' into gl3d-annotations
etpinard May 9, 2017
981b1a1
Merge branch 'master' into gl3d-annotations
etpinard May 16, 2017
94b940d
rename anchor -> anchor3 so that it doesn't conflict w/ for-loop block
etpinard May 16, 2017
8ac2551
Merge branch 'master' into gl3d-annotations
etpinard May 24, 2017
ababc49
Revert "don't (uselessly) add annotation class to ann text group inner"
etpinard May 24, 2017
7cfba36
fix 3d annotations on type: 'category' axes
etpinard May 24, 2017
8f9e370
make sure to clear 3d annotations when parent scene gets removed
etpinard May 24, 2017
1bbabad
implement autorange logic for annotations
etpinard May 24, 2017
9520943
first pass 3d annotations jasmine tests
etpinard May 24, 2017
f61cd4d
first pass 3d annotation image test support
etpinard May 24, 2017
8cb10c1
try to make test that update the scene camera more robust
etpinard May 25, 2017
a31549d
replace 'annotation' class for 'annotation-text' for annation text nodes
etpinard May 25, 2017
bd9c867
mv 3d annotations code out of plots/gl3d into component/annotations3d
etpinard May 25, 2017
21c8cc6
add common annotations defaults modules
etpinard May 25, 2017
adfc305
declare `ax` and `ay` as `valType: number` for annotation3d
etpinard May 25, 2017
c084da0
rename _scene ref to scene id in annotation container _sceneId
etpinard May 25, 2017
ef985cf
put 'captureevents' under common annotation defaults
etpinard May 25, 2017
0b4214f
Merge branch 'master' into gl3d-annotations
etpinard May 25, 2017
8b8a088
pass subplotId as arg to Annotations.drawRaw
etpinard May 26, 2017
1d5606a
include subplotId in clickannotation event data
etpinard May 26, 2017
46ab63d
rm subplotId key from clickannotations event data when falsy
etpinard May 26, 2017
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
2 changes: 0 additions & 2 deletions src/components/annotations/annotation_defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,5 @@ module.exports = function handleAnnotationDefaults(annIn, annOut, fullLayout, op
annOut._yclick = (yClick === undefined) ? annOut.y : yClick;
}

coerce('captureevents', !!annOut.hovertext);

return annOut;
};
2 changes: 2 additions & 0 deletions src/components/annotations/common_defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,6 @@ module.exports = function handleAnnotationCommonDefaults(annIn, annOut, fullLayo
color: globalHoverLabel.font.color || hoverBorder
});
}

coerce('captureevents', !!hoverText);
};
4 changes: 2 additions & 2 deletions src/components/annotations3d/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ module.exports = {
arrowwidth: annAtts.arrowwidth,
standoff: annAtts.standoff,
hovertext: annAtts.hovertext,
hoverlabel: annAtts.hoverlabel
hoverlabel: annAtts.hoverlabel,
captureevents: annAtts.captureevents
Copy link
Contributor Author

@etpinard etpinard May 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this, hover labels on 3d annotations are working:
peek 2017-05-25 16-37

off:

        Plotly.newPlot('graph', [{
            type: 'scatter3d',
            x: [1, 2, 3],
            y: [1, 2, 3],
            z: [1, 2, 1]
        }], {
            scene: {
                annotations: [{
                    text: 'hello',
                    x: 2, 
                    y: 2,
                    z: 2,
                    ay: -100,
                    hovertext: 'HELLO',
                    hoverlabel: {
                      bgcolor: 'red',
                      font: {size: 20}
                    }
                }]
            },
        })

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about the plotly_clickannotation event? Looks like that might need a sceneId if there is one? Which brings up the point that for extensibility to other non-cartesian subplots perhaps it should really be called subplotId...

Copy link
Contributor Author

@etpinard etpinard May 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • commit 8b8a088 generalises drawRaw
  • commit 1d5606a add subplotId to the plotly_clickannotation event data + 🔒 it down.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After 1d5606a, this and that assertions are failing, because the event data now contains subplotId: false for cartesian/paper-ref annotations.

@alexcjohnson would you prefer leaving subplotId out of the cartesian/paper-ref annotation event data or keep it as subplotId: false?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you prefer leaving subplotId out of the cartesian/paper-ref annotation event data or keep it as subplotId: false

haha didn't see this before my comment

yeah, lets omit it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in 46ab63d


// maybes later?
// clicktoshow: annAtts.clicktoshow,
// xclick: annAtts.xclick,
// yclick: annAtts.yclick,
// captureevent: annAtts.captureevent

// not needed!
// axref: 'pixel'
Expand Down