<commit_before>'use strict';
/* jshint camelcase: false */

// ---external global dependencies
/* global d3:false */

var fx = module.exports = {},
    Plotly = require('./plotly'),
    tinycolor = require('tinycolor2');

fx.layoutAttributes = {
    dragmode: {
        type: 'enumerated',
        values: ['zoom', 'pan'],
        dflt: 'zoom'
    },
    hovermode: {
        type: 'enumerated',
        values: ['x', 'y', 'closest', false]
    }
};

fx.supplyLayoutDefaults = function(layoutIn, layoutOut, fullData) {
    function coerce(attr, dflt) {
        return Plotly.Lib.coerce(layoutIn, layoutOut,
                                 fx.layoutAttributes,
                                 attr, dflt);
    }

    coerce('dragmode');

    if (layoutOut._hasGL3D) {
        coerce('hovermode', 'closest');
    } else {
        if (layoutOut._isHoriz===undefined) layoutOut._isHoriz = fx.isHoriz(fullData);
        coerce('hovermode', layoutOut._isHoriz ? 'y' : 'x');<commit_msg>add 'rotate' val to fx attributes:<commit_after>'use strict';
/* jshint camelcase: false */

// ---external global dependencies
/* global d3:false */

var fx = module.exports = {},
    Plotly = require('./plotly'),
    tinycolor = require('tinycolor2');

fx.layoutAttributes = {
    dragmode: {
        type: 'enumerated',
        values: ['zoom', 'pan', 'rotate']
    },
    hovermode: {
        type: 'enumerated',
        values: ['x', 'y', 'closest', false]
    }
};

fx.supplyLayoutDefaults = function(layoutIn, layoutOut, fullData) {
    function coerce(attr, dflt) {
        return Plotly.Lib.coerce(layoutIn, layoutOut,
                                 fx.layoutAttributes,
                                 attr, dflt);
    }

    coerce('dragmode', layoutOut._hasGL3D ? 'rotate' : 'zoom');

    if (layoutOut._hasGL3D) {
        coerce('hovermode', 'closest');
    } else {
        if (layoutOut._isHoriz===undefined) layoutOut._isHoriz = fx.isHoriz(fullData);
        coerce('hovermode', layoutOut._isHoriz ? 'y' : 'x');
{'fraction_non_alphanumeric': 0.15514669318746893, 'fraction_numerical': 0.0034808552958727, 'mean_word_length': 2.370184254606365, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1558691', 'n_tokens_mistral': 659, 'n_tokens_neox': 638, 'n_words': 128}