jQuery UI Widgets Forums General Discussions Editors ScrollBar, Slider, BulletChart, RangeSelector Slider doesn't work the same as in the past…

This topic contains 15 replies, has 2 voices, and was last updated by  BrentH 4 months, 3 weeks ago.

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author

  • BrentH
    Participant

    I have an old program that uses JQWidgets version 3.8.2. In HTML it looks like this:

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset=”utf-8″ />
    <title>Test JQWidgets</title>

    <style>
    .layerCheckbox {
    padding: 0px;
    margin: 0px;
    vertical-align: 3px;
    z-index: 1000;
    }

    .layerSlider2 {
    display: inline-block;
    margin-left: 3px;
    margin-right: 7px;
    }

    .layerLabel {
    text-wrap: normal;
    font-weight: normal;
    vertical-align: 5px;
    }
    </style>

    <script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/scripts/jquery-3.3.1.min.js”></script>
    <script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/scripts/MicrosoftAjax.js”></script>

    <!– WORKS–>
    <link rel=”stylesheet” href=”https://gissvr.leepa.org/jqwidgets/jqwidgets382/styles/jqx.base.css” type=”text/css” />
    <link rel=”stylesheet” href=”https://gissvr.leepa.org/jqwidgets/jqwidgets382/styles/jqx.ui-smoothness.css” type=”text/css” />
    <script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/jqwidgets382/jqxcore.js”></script>
    <script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/jqwidgets382/jqxbuttons.js”></script>
    <script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/jqwidgets382/jqxslider.js”></script>

    <script type=”text/javascript”>

    $(document).ready(function () {
    $(‘#slWebBaseShades’).jqxSlider({ theme: ‘ui-smoothness’, min: 0, max: 100, value: 100, step: 5, showButtons: false, showTicks: false, width: 27, height: 18 });

    });

    </script>

    </head>
    <body>

    <input id=”cbWebBaseShades” class=”layerCheckbox” type=”checkbox” checked=”checked” />
    <div id=’slWebBaseShades’ class=”layerSlider2″></div>
    <label id=”tbWebBaseShades” class=”layerLabel”>This is good – On one line.</label>

    </body>
    </html>

    This prints all the data on a single line. If I change the version to 23.1.0, it doesn’t work the same…

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset=”utf-8″ />
    <title>Test JQWidgets</title>

    <style>
    .layerCheckbox {
    padding: 0px;
    margin: 0px;
    vertical-align: 3px;
    z-index: 1000;
    }

    .layerSlider2 {
    display: inline-block;
    margin-left: 3px;
    margin-right: 7px;
    }

    .layerLabel {
    text-wrap: normal;
    font-weight: normal;
    vertical-align: 5px;
    }
    </style>
    <script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/scripts/jquery-3.3.1.min.js”></script>
    <script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/scripts/MicrosoftAjax.js”></script>

    <!– DOESN’T WORK –>
    <script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/jqwidgets2310/jqxcore.js”></script>
    <script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/jqwidgets2310/jqxbuttons.js”></script>
    <script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/jqwidgets2310/jqxslider.js”></script>
    <link rel=”stylesheet” href=”https://gissvr.leepa.org/jqwidgets/jqwidgets2310/styles/jqx.base.css” type=”text/css” />
    <link rel=”stylesheet” href=”https://gissvr.leepa.org/jqwidgets/jqwidgets2310/styles/jqx.ui-smoothness.css” type=”text/css” />

    <script type=”text/javascript”>

    $(document).ready(function () {
    $(‘#slWebBaseShades’).jqxSlider({ theme: ‘ui-smoothness’, min: 0, max: 100, value: 100, step: 5, showButtons: false, showTicks: false, width: 27, height: 18 });

    });

    </script>

    </head>
    <body>

    <input id=”cbWebBaseShades” class=”layerCheckbox” type=”checkbox” checked=”checked” />
    <div id=’slWebBaseShades’ class=”layerSlider2″></div>
    <label id=”tbWebBaseShades” class=”layerLabel”>This is bad – it should be on one line.</label>

    </body>
    </html>

    The only change is which version of the JQWidgets control I am using. How can I make the 23.1.0 slider control continue on the same row as the input and label?

    Thanks.

    Brent Hoskisson

    • This topic was modified 5 months, 3 weeks ago by  BrentH.

    admin
    Keymaster

    Hi,

    The Slider has many changes and fixes during the versions. The easiest way to put these 3 items on one line would be to use a DIV with display: flex;

    Example:

    <div style="display: flex;">
    <input id=”cbWebBaseShades” class=”layerCheckbox” type=”checkbox” checked=”checked” />
    <div id="jqxSlider"></div>
    <label id=”tbWebBaseShades” class=”layerLabel”>This is good – On one line.</label>
    </div>

    Best regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com/


    BrentH
    Participant

    Ok, it is on one line, but how do I get the slider to be more than just a big dot? Is it possible to style it more like it looks in 3.8.2?

    Brent


    BrentH
    Participant

    One issue is If I put in width: 100, the slider only takes up about 50 px and there is 50 px of white space. How do I get rid of that white space? And make the Bulb smaller?

    Thanks,

    Brent


    admin
    Keymaster

    Hi Brent,

    The width of the slider depends on the width property value. As for the spacing between the three html elements, you can check and test with the different values of the Flex box layout for justify and align and use the one which best fits to your case.

    Best regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com/


    BrentH
    Participant

    I think it is that the showbuttons: false does not collapse the space that these buttons would appear. It only hides them. So I have to double the width I want and then the layerLabel class has to have a margin-left of the same amount. At least there is a work-around for this bug.

    Also, I need to know how to make the slider bulb adjust to the height. I would like the bulb to fit in 18 pixels. How can I do that?

    Thanks
    Brent


    BrentH
    Participant

    In addition to the bulb that needs to be resizable, I found this bug as well…

    In this code, I put the slider control in a window control. The window control starts out with autoOpen: false. There is a button that opens and expands the window. However, the slider control is never created – or at least connected to the div – when the window is initialized as hidden.

    Afterwards, I cannot run the ‘setValue’ (commented in the code below). And when the window opens, the sliders do not appear! Note that if I start with autoOpen: true, everything works perfectly (except the bulb is too large). So I am quite certain you have a bug when creating a slider that starts out hidden. (code is below). How do I make the slider appear when opening the window?

    Thanks
    Brent

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset=”utf-8″ />
    <title>Test JQWidgets</title>

    <style>
    .layerCheckbox {
    padding: 0px;
    margin: 0px;
    vertical-align: 3px;
    z-index: 1000;
    }

    .layerSlider2 {
    display: inline-block;
    margin-left: 3px;
    margin-right: 7px;
    }

    .layerLabel {
    text-wrap: normal;
    font-weight: normal;
    vertical-align: 5px;
    margin-left: -40px;
    }

    #toolBoxWindow, #layersWindow {
    z-index: 200;
    }

    #OpenToolBoxWindow, #OpenLayersWindow, #OpenCoordsWindow {
    width: 30px;
    height: 30px;
    opacity: .7;
    z-index: 100;
    }

    #OpenToolBoxWindow:hover,
    #OpenLayersWindow:hover,
    #OpenCoordsWindow:hover {
    opacity: 1;
    height: 35px;
    width: 35px;
    transform: scale(1.02);
    }
    </style>
    <script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/scripts/jquery-3.3.1.min.js”></script> <!–The latest 3.7.1 seems to break GeoView–>
    <script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/scripts/MicrosoftAjax.js”></script>

    <!– DOESN’T WORK –>
    <script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/jqwidgets2310/jqxcore.js”></script>
    <!–<script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/jqwidgets2310/jqxdata.js”></script>–>
    <script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/jqwidgets2310/jqxwindow.js”></script>
    <script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/jqwidgets2310/jqxbuttons.js”></script>
    <script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/jqwidgets2310/jqxcheckbox.js”></script>
    <script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/jqwidgets2310/jqxscrollbar.js”></script>
    <script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/jqwidgets2310/jqxpanel.js”></script>
    <script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/jqwidgets2310/jqxtree.js”></script>
    <script type=”text/javascript” src=”https://gissvr.leepa.org/jqwidgets/jqwidgets2310/jqxslider.js”></script>

    <link rel=”stylesheet” href=”https://gissvr.leepa.org/jqwidgets/jqwidgets2310/styles/jqx.base.css” type=”text/css” />
    <link rel=”stylesheet” href=”https://gissvr.leepa.org/jqwidgets/jqwidgets2310/styles/jqx.ui-smoothness.css” type=”text/css” />
    <link rel=”stylesheet” href=”https://gissvr.leepa.org/jqwidgets/jqwidgets2310/styles/jqx.summer.css” type=”text/css” />

    <script type=”text/javascript”>

    $(document).ready(function () {
    layerwinpos = $(window).width() – 308; //position for the default left of this window
    $(‘#layersWindow’).jqxWindow({ width: 300, height: $(window).height() – 70, maxHeight: 600, position: { x: layerwinpos, y: 4 }, resizable: true, autoOpen: false, theme: ‘ui-smoothness’, closeButtonSize: 25 });

    $(‘#tvLayers’).jqxTree({
    height: ‘100%’, width: ‘100%’, hasThreeStates: false, toggleMode: ‘dblclick’,
    checkboxes: false, theme: ‘ui-smoothness’
    });

    $(‘#slWebBaseShades’).jqxSlider({ theme: ‘ui-smoothness’, min: 0, max: 100, value: 0, step: 5, showButtons: false, showTicks: false, width: 90, height: 18 });
    $(‘#slParcelLayer’).jqxSlider({ theme: ‘ui-smoothness’, min: 0, max: 100, value: 100, step: 5, showButtons: false, showTicks: false, width: 90, height: 18 });

    //$(‘#slWebBaseShades’).jqxSlider(‘setValue’, 0);
    $(‘#slWebBaseShades’).on(‘change’, function (event) { ChangeOpacity(event.args.value); });
    $(‘#slParcelLayer’).on(‘change’, function (event) { ChangeOpacity(event.args.value); });

    $(‘#OpenLayersWindow’).mouseup(function () {
    $(‘#layersWindow’).jqxWindow(‘expand’);
    $(‘#layersWindow’).jqxWindow(‘open’);
    $(‘#OpenLayersWindow’).hide();
    });

    $(‘#layersWindow’).on(‘close’, function (event) {
    $(‘#OpenLayersWindow’).show();
    });

    });

    function ChangeOpacity(value) {
    //alert(value);
    }

    </script>

    </head>
    <body>
    The issues are, when autoOpen is set to false and window is opened with a button (click image in upper right of demo),<br/>
    The sliders were never initialized and so do not appear in the window.<br/>
    In addtion the slider bulbs cannot be resized.
    Show Layer Controls and Legend
    <div id=”layersWindow”>
    <div id=”layersWindowHeader”>
    <span id=”captureContainer” style=”float: right”>Layer Controls and Legend</span>
    </div>
    <div id=”layersWindowContent” style=”overflow: hidden”>
    <div id=’tvLayers’>

    • <div style=”display: flex;”>
      <input id=”cbWebBaseShades” class=”layerCheckbox” type=”checkbox” checked=”checked” />
      <div id=’slWebBaseShades’ class=”layerSlider2″></div>
      <label id=”tbWebBaseShades” class=”layerLabel”>1st Row.</label>
      </div>
    • <div style=”display: flex;”>
      <input id=”cbParcelLayer” class=”layerCheckbox” type=”checkbox” />
      <div id=’slParcelLayer’ class=”layerSlider2″></div>
      <label id=”tbParcelLayer” class=”layerLabel”>2nd Row.</label>
      </div>

    </div>
    </div>
    </div>
    </body>
    </html>

    • This reply was modified 5 months, 2 weeks ago by  BrentH.

    BrentH
    Participant

    I worked out javascript to work around the problem of initializing the sliders before the window opens.

    I cannot figure out how to get a smaller thumb circle on the slider. PLEASE HELP.

    Brent


    admin
    Keymaster

    Hi BrentH,

    In jqxWindow, the components should be initialized in the jqxWindow’s initContent function. It is called when the window becomes first visible. This will ensure accurate rendering of the components inside the jqxWindow.

    Best regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com/


    BrentH
    Participant

    The initWindow works for the jqxWindow.

    But the jqxTree, it turns out, has the same issue. Can I initialize the sliders that would be hidden in a tree control?

    I think it was much less complicated to just initialize all the controls at the loading of the page.

    Thanks
    Brent


    BrentH
    Participant

    I was trying to figure out how I missed the initContent method for jqxWindow. And I am NOT insane! That is an undocumented feature! What else is undocumented I wonder.

    Brent


    BrentH
    Participant

    Are you done discussing this with me?

    Remaining issues:
    1. The slider thumb bulb cannot be resized.
    2. When the slider showbuttons is false, it doesn’t collapse the area that would be used by the buttons.
    3. Slider doesn’t initialize in a collapsed node of a jqxTree control.

    Thanks
    Brent


    admin
    Keymaster

    Hi,

    initContent is documented – https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxwindow/jquery-window-api.htm
    With our jqxTree, you cannot have sliders as tree nodes or inside tree nodes.
    The buttons of the Slider are always part of the Slider’s layout.

    Best regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com/


    BrentH
    Participant

    It is an unusual response basically our controls don’t support our controls.

    So I am stuck in an old version of JQWidgets that works but was broken for whatever reason? Do I need to keep paying licensing fees if you are never going to fix your issues?

    • This reply was modified 5 months ago by  BrentH.

    admin
    Keymaster

    Hi BrentH,

    We never had the option to put a slider in tree nodes, neither a demo or have supported such scenario. The jqxSlider is a UI component which has interactive dragging and mouse and touch events support. The jqxTree also handles such events and having a slider in a tree node will lead to conflicts in the behavior. We do not display components, not only sliders but any components in Tree items. The Tree items can display only text and images.

    Best regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com/

Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in to reply to this topic.