Get your own customer support community
 

using the Seadragon Ajax source under linux

I've downloaded the source for Seadragon Ajax (both the Ajax Control Toolkit and the ASP.NET version), but I can't figure out how to use it under linux. Most of the .js files seem to assume that other ones have been loaded already. Is there a simple "load.js" I could load which will load the necessary files, at least while exploring how it works?

Sorry for the naive question. I'm new to javascript programming. I'm not using a development environment, and would prefer to not need to do so.
Inappropriate?
1 person has this question

The company marked this question as answered.


  • Inappropriate?
    Hey Dan,

    This is not a naive question at all -- we're here to help!

    I have very little experience working with or on the Microsoft Ajax Library version (which was formerly the Ajax Control Toolkit version, but they're both roughly the same). That version was actually ported over by the ASP.NET team; we gave them the source code to our original standalone version (which we serve up from seadragon.com as seadragon-min.js), and they made significant changes to the source to integrate it nicely with the rest of the Microsoft Ajax Library.

    Internally, for our standalone version, we do have exactly a "load.js" type of file to aid development without a full dev environment, but you're right, that file didn't get ported over to the Microsoft Ajax Library version. They instead have a build process which concatenates the files.

    I'm happy to share the source to our "load.js" file, but note that part of the changes they made in their port was to the structure and organization of the various source files. So I've tried my best to match up the filenames and whatnot, but please excuse any mistakes.

    By the way, I'm assuming you're working with the source files and not the built ones. The source files end in ".pre.js" while the built files end in either just ".js" or ".debug.js". If you're working with the built files, it should work to just replace ".pre.js" everywhere below with ".debug.js" instead.


    // seadragon-dev.js
    // Loads the various Seadragon Ajax source files for ease of development.
    // This is a port for the Microsoft Ajax Library version of the source files.
     
    (function() {
     
    var PATH = "Client/MicrosoftAjax.Extended/Seadragon/"; // the path to the scripts, relative to HTML page
    var SCRIPTS = [ // the script filenames, in dependency order
    "Seadragon.Config.pre.js",
    "Seadragon.Strings.pre.js",
    "Seadragon.Profiler.pre.js",
    "Seadragon.Point.pre.js",
    "Seadragon.Rect.pre.js",
    "Seadragon.Spring.pre.js",
    "Seadragon.Utils.pre.js",
    "Seadragon.MouseTracker.pre.js",
    "Seadragon.ImageLoader.pre.js",
    "Seadragon.Buttons.pre.js",
    "Seadragon.TileSource.pre.js",
    "Seadragon.DisplayRect.pre.js",
    "Seadragon.DeepZoom.pre.js",
    "Seadragon.Viewport.pre.js",
    "Seadragon.Drawer.pre.js",
    "Seadragon.pre.js"
    ];
     
    var html = [];
     
    for (var i = 0; i < SCRIPTS.length; i++) {
    html.push('<script type="text/javascript" src="');
    html.push(PATH);
    html.push(SCRIPTS[i]);
    html.push('"></script>\n');
    }
     
    document.write(html.join(''));
     
    })();
     

    Note that the code will still have a dependency on the Microsoft Ajax Library, so you'll have to include that code in your page as well. But I think this is really easy to do since the library is hosted on a CDN:


    <script src="http://ajax.microsoft.com/ajax/beta/0911/MicrosoftAjax.js"></script>
     

    So try that and let me know if you encounter any problems. I hope this helps!
     
    happy I’m happy to help
    Sprite_screen 1 person says this answers the question
User_default_medium