Skip to content

Instantly share code, notes, and snippets.

View AlexMold's full-sized avatar
🎯
Focusing

Alex Gribcov AlexMold

🎯
Focusing
View GitHub Profile
$(function() {
$('#js-news-tabs').each(function(){
// For each set of tabs, we want to keep track of
// which tab is active and its associated content
var $active, $content, $links = $(this).find('a');
// If the location.hash matches one of the links, use that as the active tab.
// If no match is found, use the first link as the initial active tab.
$active = $($links.filter('[href="'+location.hash+'"]')[0] || $links[0]);
$active.addClass('is-active');
class DropdownCabinet {
constructor(){
this.$toggler = $('.js-dropdown-toggler');
this.$list = $('.js-dropdown-list');
this.$html = $('html');
this.init();
}
init(){
@AlexMold
AlexMold / server.js
Last active April 24, 2017 19:33
react-ssr-server
// React modules
import { RouterContext, match } from 'react-router'
import { renderToString, renderToStaticMarkup } from 'react-dom/server'
import React from 'react'
import NotFound from './frontend/containers/NotFound'
import routes from './routes'
import Html from './frontend/containers/Html'
@AlexMold
AlexMold / DicomService.ts
Last active November 13, 2024 18:33
react dicom render
import type { Types } from "@cornerstonejs/core";
import { RenderingEngine, Enums, setVolumesForViewports, volumeLoader} from "@cornerstonejs/core";
import * as cornerstoneTools from "@cornerstonejs/tools";
import initDemo from "./initDemo";
const { PanTool, WindowLevelTool, StackScrollTool, ZoomTool, ToolGroupManager, Enums: csToolsEnums } = cornerstoneTools;
const { MouseBindings } = csToolsEnums;
const { ViewportType } = Enums;
const toolGroupId = 'myToolGroup';